Annotation of OpenXM_contrib/PHC/Ada/Root_Counts/Product/ts_startsys.adb, Revision 1.1.1.1
1.1 maekawa 1: with text_io,integer_io; use text_io,integer_io;
2: with Standard_Complex_Vectors_io; use Standard_Complex_Vectors_io;
3: with Standard_Complex_Poly_Systems; use Standard_Complex_Poly_Systems;
4: with Standard_Complex_Poly_Systems_io; use Standard_Complex_Poly_Systems_io;
5: with Standard_Complex_Poly_SysFun; use Standard_Complex_Poly_SysFun;
6: with Standard_Complex_Solutions; use Standard_Complex_Solutions;
7: with Total_Degree_Start_Systems; use Total_Degree_Start_Systems;
8:
9: procedure ts_startsys is
10:
11: -- DESCRIPTION :
12: -- Test on the construction of total-degree based start systems.
13:
14: procedure Evaluate ( p : in Poly_Sys; sols : in Solution_List ) is
15:
16: -- DESCRIPTION :
17: -- Evaluates every solution in p and displays the result.
18:
19: tmp : Solution_List := sols;
20: cnt : natural := 0;
21:
22: begin
23: while not Is_Null(tmp) loop
24: cnt := cnt + 1;
25: put("Eval solution no. "); put(cnt,1); put(" : ");
26: put(Eval(p,Head_Of(tmp).v)); new_line;
27: tmp := Tail_Of(tmp);
28: end loop;
29: end Evaluate;
30:
31: procedure Main is
32:
33: lp : Link_to_Poly_Sys;
34:
35: begin
36: new_line;
37: put_line("Testing the construction of a total-degree based start system.");
38: new_line;
39: get(lp);
40: declare
41: q : Poly_Sys(lp'range);
42: qsols : Solution_List;
43: begin
44: Start_System(lp.all,q,qsols);
45: Evaluate(q,qsols);
46: end;
47: end Main;
48:
49: begin
50: Main;
51: end ts_startsys;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>