with text_io,integer_io; use text_io,integer_io;
with Standard_Complex_Vectors_io; use Standard_Complex_Vectors_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_Solutions; use Standard_Complex_Solutions;
with Total_Degree_Start_Systems; use Total_Degree_Start_Systems;
procedure ts_startsys is
-- DESCRIPTION :
-- Test on the construction of total-degree based start systems.
procedure Evaluate ( p : in Poly_Sys; sols : in Solution_List ) is
-- DESCRIPTION :
-- Evaluates every solution in p and displays the result.
tmp : Solution_List := sols;
cnt : natural := 0;
begin
while not Is_Null(tmp) loop
cnt := cnt + 1;
put("Eval solution no. "); put(cnt,1); put(" : ");
put(Eval(p,Head_Of(tmp).v)); new_line;
tmp := Tail_Of(tmp);
end loop;
end Evaluate;
procedure Main is
lp : Link_to_Poly_Sys;
begin
new_line;
put_line("Testing the construction of a total-degree based start system.");
new_line;
get(lp);
declare
q : Poly_Sys(lp'range);
qsols : Solution_List;
begin
Start_System(lp.all,q,qsols);
Evaluate(q,qsols);
end;
end Main;
begin
Main;
end ts_startsys;