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

File: [local] / OpenXM_contrib / PHC / Ada / Root_Counts / Product / random_product_system.ads (download)

Revision 1.1.1.1 (vendor branch), Sun Oct 29 17:45:29 2000 UTC (23 years, 7 months ago) by maekawa
Branch: PHC, MAIN
CVS Tags: v2, maekawa-ipv6, RELEASE_1_2_3, RELEASE_1_2_2_KNOPPIX_b, RELEASE_1_2_2_KNOPPIX, RELEASE_1_2_2, RELEASE_1_2_1, HEAD
Changes since 1.1: +0 -0 lines

Import the second public release of PHCpack.

OKed by Jan Verschelde.

with Standard_Complex_Vectors;           use Standard_Complex_Vectors;
with Standard_Complex_Polynomials;       use Standard_Complex_Polynomials;
with Standard_Complex_Poly_Systems;      use Standard_Complex_Poly_Systems;
with Standard_Complex_Solutions;         use Standard_Complex_Solutions;
with Lists_of_Integer_Vectors;           use Lists_of_Integer_Vectors;

package Random_Product_System is

-- DESCRIPTION :
--   This package enables the construction and the solution
--   of a polynomial system of which each polynomial is 
--   represented as a product of hyperplanes.

-- CONSTRUCTORS :

  procedure Init ( n : in natural );

  -- DESCRIPTION :
  --   The internal data for this package are initialised
  --   with n, this is the number of equations of the system
  -- NOTE :
  --   This operation must be the first one executed when
  --   using this package.

  procedure Add_Hyperplane ( i : in natural; h : in Vector );

  -- DESCRIPTION :
  --   The hyperplane h is added to the i-the equation of the
  --   random product system                   
  -- REQUIRED :                               __n_
  --   i <= n                                 \
  --   h : Vector(0..n) representing  h(0) +   >    h(j) x
  --                                          /___        j
  --                                           j=1

  function Dimension return natural;

  -- DESCRIPTION :
  --   returns the number of equations in the product system.

  function Number_of_Hyperplanes (i : natural) return natural;

  -- DESCRIPTION :
  --   returns the number of added hyperplanes for the i-th equation

  function Get_Hyperplane ( i,j : in natural ) return Vector;
  function Get_Hyperplane ( i,j : in natural ) return Link_to_Vector;

  -- DESCRIPTION :
  --   returns the j-th hyperplane for the i-th equation

  procedure Change_Hyperplane ( i,j : in natural; h : in Vector );

  -- DESCRIPTION :
  --   the (i,j)-th hyperplane will be changed into h

  procedure Solve ( sols : in out Solution_List; nl : out natural );

  -- DESCRIPTION :
  --   The random product system is solved and the solutions are
  --   put in the list sols.
  --   nl is the number of matrices that are factored.
  -- NOTE :
  --   All possible linear systems are factorized using Gaussian
  --   elimination, together with the estimation of the condition
  --   of the matrices.
  --   Systems with a bad condition are not solved.

  procedure Solve ( sols : in out Solution_List; 
                    nl : out natural; l : in List );

  -- DESCRIPTION :
  --   Cf. Solve, but only those linear systems are factorized,
  --   for which the linear equations are as indicated in the list
  --   of positions l.

  function Polynomial ( h : Vector ) return Poly;

  -- DESCRIPTION :
  --   returns the linear polynomial defined by the coefficients in h.

  function Polynomial_System return Poly_Sys;

  -- DESCRIPTION :
  --   A polynomial system is constructed by multiplying all
  --   the hyperplanes from the equations of the random product system.

-- DESTRUCTOR :

  procedure Clear;

  -- DESCRIPTION :
  --   This procedure frees all memory space used by the random
  --   product system.

end Random_Product_System;