File: [local] / OpenXM_contrib / PHC / Ada / Math_Lib / Polynomials / generic_laur_poly_functions.ads (download)
Revision 1.1.1.1 (vendor branch), Sun Oct 29 17:45:26 2000 UTC (23 years, 10 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 Abstract_Ring;
with Abstract_Ring.Field;
with Generic_Vectors;
with Generic_Laurent_Polynomials;
generic
with package Ring is new Abstract_Ring(<>);
with package Field is new Ring.Field(<>);
with package Vectors is new Generic_Vectors(Ring);
with package Polynomials is new Generic_Laurent_Polynomials(Ring);
package Generic_Laur_Poly_Functions is
-- DESCRIPTION :
-- Besides the term by term evaluation, two special data structures are
-- provided for efficient evaluation of polynomials in several variables.
-- With negative exponents, numeric/constraint errors are raised when
-- zero is evaluated.
use Ring,Field,Vectors,Polynomials;
-- FUNCTION TYPE :
type Evaluator is access function ( x : Vector ) return number;
-- DATA STRUCTURES :
type Eval_Poly is private;
type Eval_Coeff_Poly is private;
-- CONSTRUCTORS :
function Create ( p : Poly ) return Eval_Poly;
function Create ( p : Poly ) return Eval_Coeff_Poly;
procedure Diff ( p : in Poly; i : in integer;
cp : out Eval_Coeff_Poly; m : out Vector );
-- evaluable coefficient polynomial of the partial derivative,
-- with m the multiplication factors of the coefficients of p
function Coeff ( p : Poly ) return Vector; -- returns coefficient vector
-- EVALUATORS :
function Eval ( p : Poly; x : number; i : integer ) return Poly;
-- return p(x1,..,xi=x,..,xn);
-- Number_of_Unknowns(Eval(p,x,i)) = Number_of_Unknowns(p)-1
function Eval ( d : Degrees; c : number; x : Vector ) return number;
-- return c*x**d
function Eval ( t : Term; c : number; x : Vector ) return number;
-- return c*x**d, with d = t.dg
function Eval ( t : Term; x : Vector ) return number;
function Eval ( p : Poly; x : Vector ) return number; -- return p(x)
function Eval ( p : Poly; c,x : Vector ) return number;
-- return p(c,x), with c = vector of coefficients for p
function Eval ( p : Eval_Poly; x : Vector ) return number; -- return p(x)
function Eval ( p : Eval_Coeff_Poly; c,x : Vector ) return number;
-- return p(c,x), with c = vector of coefficients for p
-- DESTRUCTORS : deallocate memory.
procedure Clear ( p : in out Eval_Poly );
procedure Clear ( p : in out Eval_Coeff_Poly );
private
type Eval_Poly_Rep;
type Eval_Coeff_Poly_Rep;
type Eval_Poly is access Eval_Poly_Rep;
type Eval_Coeff_Poly is access Eval_Coeff_Poly_Rep;
end Generic_Laur_Poly_Functions;