with Abstract_Ring; with Generic_Vectors,Generic_VecVecs; with Generic_Matrices; with Generic_Polynomials; with Generic_Polynomial_Functions; with Generic_Polynomial_Systems; with Generic_Poly_System_Functions; generic with package Ring is new Abstract_Ring(<>); with package Vectors is new Generic_Vectors(Ring); with package VecVecs is new Generic_VecVecs(Ring,Vectors); with package Matrices is new Generic_Matrices(Ring,Vectors); with package Polynomials is new Generic_Polynomials(Ring); with package Poly_Functions is new Generic_Polynomial_Functions(Ring,Vectors,Polynomials); with package Poly_Systems is new Generic_Polynomial_Systems(Ring,Polynomials); with package Poly_SysFun is new Generic_Poly_System_Functions(Ring,Vectors,VecVecs,Polynomials, Poly_Functions,Poly_Systems); package Generic_Jacobian_Matrices is -- DESCRIPTION : -- This package provides data structures and evaluation functions for -- Jacobian matrices of systems of polynomials. use Ring,Vectors,VecVecs,Matrices; use Polynomials,Poly_Functions,Poly_Systems,Poly_SysFun; -- FUNCTION TYPE : type Evaluator is access function ( x : Vector ) return Matrix; -- DATA STRUCTURES : type Jaco_Mat is array ( integer range <>, integer range <> ) of Poly; type Eval_Jaco_Mat is array ( integer range <>, integer range <> ) of Eval_Poly; type Eval_Coeff_Jaco_Mat is array ( integer range <>, integer range <> ) of Eval_Coeff_Poly; type Mult_Factors is array ( integer range <>, integer range <> ) of Link_to_Vector; -- USAGE : -- p : Poly_Sys(1..n); -- j : Jaco_Mat(1..n,1..n) := Create(p); -- => j(i,j) = Diff(p(i),j) -- CREATORS : function Create ( p : Poly_Sys ) return Jaco_Mat; -- REQUIRED : -- The number of the unknowns of each polynomial must be the same function Create ( j : Jaco_Mat ) return Eval_Jaco_Mat; procedure Create ( p : Poly_Sys; j : out Eval_Coeff_Jaco_Mat; m : out Mult_Factors ); -- EVALUATORS : function Eval ( j : Jaco_Mat; x : Vector ) return Matrix; -- return j(x); function Eval ( j : Eval_Jaco_Mat; x : Vector ) return Matrix; -- return j(x); function Eval ( j : Eval_Coeff_Jaco_Mat; m : Mult_Factors; c : VecVec; x : Vector ) return Matrix; -- returns j(c,x) with c the coefficients of the original polynomials -- DESTRUCTORS : procedure Clear ( j : in out Jaco_Mat ); procedure Clear ( j : in out Eval_Jaco_Mat ); procedure Clear ( j : in out Eval_Coeff_Jaco_Mat ); procedure Clear ( m : in out Mult_Factors ); -- DESCRIPTION : -- Deallocation of the occupied memory. end Generic_Jacobian_Matrices;