[BACK]Return to random_product_system.ads CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / PHC / Ada / Root_Counts / Product

Annotation of OpenXM_contrib/PHC/Ada/Root_Counts/Product/random_product_system.ads, Revision 1.1

1.1     ! maekawa     1: with Standard_Complex_Vectors;           use Standard_Complex_Vectors;
        !             2: with Standard_Complex_Polynomials;       use Standard_Complex_Polynomials;
        !             3: with Standard_Complex_Poly_Systems;      use Standard_Complex_Poly_Systems;
        !             4: with Standard_Complex_Solutions;         use Standard_Complex_Solutions;
        !             5: with Lists_of_Integer_Vectors;           use Lists_of_Integer_Vectors;
        !             6:
        !             7: package Random_Product_System is
        !             8:
        !             9: -- DESCRIPTION :
        !            10: --   This package enables the construction and the solution
        !            11: --   of a polynomial system of which each polynomial is
        !            12: --   represented as a product of hyperplanes.
        !            13:
        !            14: -- CONSTRUCTORS :
        !            15:
        !            16:   procedure Init ( n : in natural );
        !            17:
        !            18:   -- DESCRIPTION :
        !            19:   --   The internal data for this package are initialised
        !            20:   --   with n, this is the number of equations of the system
        !            21:   -- NOTE :
        !            22:   --   This operation must be the first one executed when
        !            23:   --   using this package.
        !            24:
        !            25:   procedure Add_Hyperplane ( i : in natural; h : in Vector );
        !            26:
        !            27:   -- DESCRIPTION :
        !            28:   --   The hyperplane h is added to the i-the equation of the
        !            29:   --   random product system
        !            30:   -- REQUIRED :                               __n_
        !            31:   --   i <= n                                 \
        !            32:   --   h : Vector(0..n) representing  h(0) +   >    h(j) x
        !            33:   --                                          /___        j
        !            34:   --                                           j=1
        !            35:
        !            36:   function Dimension return natural;
        !            37:
        !            38:   -- DESCRIPTION :
        !            39:   --   returns the number of equations in the product system.
        !            40:
        !            41:   function Number_of_Hyperplanes (i : natural) return natural;
        !            42:
        !            43:   -- DESCRIPTION :
        !            44:   --   returns the number of added hyperplanes for the i-th equation
        !            45:
        !            46:   function Get_Hyperplane ( i,j : in natural ) return Vector;
        !            47:   function Get_Hyperplane ( i,j : in natural ) return Link_to_Vector;
        !            48:
        !            49:   -- DESCRIPTION :
        !            50:   --   returns the j-th hyperplane for the i-th equation
        !            51:
        !            52:   procedure Change_Hyperplane ( i,j : in natural; h : in Vector );
        !            53:
        !            54:   -- DESCRIPTION :
        !            55:   --   the (i,j)-th hyperplane will be changed into h
        !            56:
        !            57:   procedure Solve ( sols : in out Solution_List; nl : out natural );
        !            58:
        !            59:   -- DESCRIPTION :
        !            60:   --   The random product system is solved and the solutions are
        !            61:   --   put in the list sols.
        !            62:   --   nl is the number of matrices that are factored.
        !            63:   -- NOTE :
        !            64:   --   All possible linear systems are factorized using Gaussian
        !            65:   --   elimination, together with the estimation of the condition
        !            66:   --   of the matrices.
        !            67:   --   Systems with a bad condition are not solved.
        !            68:
        !            69:   procedure Solve ( sols : in out Solution_List;
        !            70:                     nl : out natural; l : in List );
        !            71:
        !            72:   -- DESCRIPTION :
        !            73:   --   Cf. Solve, but only those linear systems are factorized,
        !            74:   --   for which the linear equations are as indicated in the list
        !            75:   --   of positions l.
        !            76:
        !            77:   function Polynomial ( h : Vector ) return Poly;
        !            78:
        !            79:   -- DESCRIPTION :
        !            80:   --   returns the linear polynomial defined by the coefficients in h.
        !            81:
        !            82:   function Polynomial_System return Poly_Sys;
        !            83:
        !            84:   -- DESCRIPTION :
        !            85:   --   A polynomial system is constructed by multiplying all
        !            86:   --   the hyperplanes from the equations of the random product system.
        !            87:
        !            88: -- DESTRUCTOR :
        !            89:
        !            90:   procedure Clear;
        !            91:
        !            92:   -- DESCRIPTION :
        !            93:   --   This procedure frees all memory space used by the random
        !            94:   --   product system.
        !            95:
        !            96: end Random_Product_System;

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>