with text_io,integer_io; use text_io,integer_io; with Symbol_Table; with Standard_Complex_Numbers; use Standard_Complex_Numbers; with Standard_Complex_Numbers_io; use Standard_Complex_Numbers_io; with Standard_Complex_Vectors; use Standard_Complex_Vectors; with Standard_Complex_Vectors_io; use Standard_Complex_Vectors_io; with Standard_Complex_Polynomials; use Standard_Complex_Polynomials; with Standard_Complex_Polynomials_io; use Standard_Complex_Polynomials_io; with Standard_Complex_Poly_Systems; use Standard_Complex_Poly_Systems; with Standard_Complex_Poly_Systems_io; use Standard_Complex_Poly_Systems_io; with Standard_Complex_Poly_SysFun; use Standard_Complex_Poly_SysFun; with Standard_Complex_Jaco_Matrices; use Standard_Complex_Jaco_Matrices; with Standard_to_Multprec_Convertors; use Standard_to_Multprec_Convertors; with Multprec_Complex_Polynomials_io; use Multprec_Complex_Polynomials_io; with Multprec_Complex_Poly_Systems; use Multprec_Complex_Poly_Systems; with Multprec_Complex_Jaco_Matrices; use Multprec_Complex_Jaco_Matrices; procedure ts_jaco is -- DESCRIPTION : -- This routine provides basic testing routines for Jacobian matrices. procedure Test_Standard_Creation is -- DESCRIPTION : -- Tests the creation of a standard Jacobian matrix. lp : Standard_Complex_Poly_Systems.Link_to_Poly_Sys; n : natural; begin new_line; put_line("Testing the creation of standard Jacobian matrices."); new_line; get(lp); put_line("The system : "); put(lp.all); n := lp'last; declare jm : Standard_Complex_Jaco_Matrices.Jaco_Mat(1..n,1..n) := Create(lp.all); begin put_line("The Jacobian matrix : "); for i in jm'range loop for j in jm'range loop put(jm(i,j)); end loop; new_line; end loop; end; end Test_Standard_Creation; procedure Test_Multprec_Creation is -- DESCRIPTION : -- Tests the creation of a multi-precision Jacobian matrix. lp : Standard_Complex_Poly_Systems.Link_to_Poly_Sys; n : natural; begin new_line; put_line("Testing the creation of multi-precision Jacobian matrices."); new_line; get(lp); put_line("The system : "); put(lp.all); n := lp'last; declare mp : Multprec_Complex_Poly_Systems.Poly_Sys(1..n) := Convert(lp.all); jm : Multprec_Complex_Jaco_Matrices.Jaco_Mat(1..n,1..n) := Create(mp); begin put_line("The Jacobian matrix : "); for i in jm'range loop for j in jm'range loop put(jm(i,j)); end loop; new_line; end loop; end; end Test_Multprec_Creation; procedure Main is ans : character; begin new_line; put_line("Interactive testing of the operations on complex polynomials."); loop new_line; put_line("Choose one of the following : "); put_line(" 0. Exit this program. "); put_line(" 1. Test creation of standard Jacobian matrices. "); put_line(" 2. Test creation of multi-precision Jacobian matrices. "); put("Type 0,1 or 2 to select : "); get(ans); exit when (ans = '0'); case ans is when '1' => Test_Standard_Creation; when '2' => Test_Multprec_Creation; when others => null; end case; end loop; end Main; begin Main; end ts_jaco;