[BACK]Return to ts_mixture.adb CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / PHC / Ada / Root_Counts / Stalift

Annotation of OpenXM_contrib/PHC/Ada/Root_Counts/Stalift/ts_mixture.adb, Revision 1.1.1.1

1.1       maekawa     1: with text_io,integer_io;                 use text_io,integer_io;
                      2: with Communications_with_User;           use Communications_with_User;
                      3: with Standard_Integer_Vectors;           use Standard_Integer_Vectors;
                      4: with Standard_Integer_Vectors_io;        use Standard_Integer_Vectors_io;
                      5: with Arrays_of_Integer_Vector_Lists;     use Arrays_of_Integer_Vector_Lists;
                      6: with Symbol_Table;
                      7: with Standard_Complex_Poly_Systems;      use Standard_Complex_Poly_Systems;
                      8: with Standard_Complex_Poly_Systems_io;   use Standard_Complex_Poly_Systems_io;
                      9: with Power_Lists;                        use Power_Lists;
                     10: with Mixed_Volume_Computation;           use Mixed_Volume_Computation;
                     11:
                     12: procedure ts_mixture is
                     13:
                     14:   ans : character;
                     15:
                     16:   procedure Compute_Mixture ( p : in Poly_Sys ) is
                     17:
                     18:        supports : Array_of_Lists(p'range) := Create(p);
                     19:        mix,perms : Link_to_Vector;
                     20:
                     21:   begin
                     22:        Compute_Mixture(supports,mix,perms);
                     23:     put("Type of mixture : "); put(mix.all); new_line;
                     24:   end Compute_Mixture;
                     25:
                     26:   procedure Main_Test is
                     27:
                     28:     file : file_type;
                     29:     lp : Link_to_Poly_Sys;
                     30:
                     31:   begin
                     32:        put_line("Reading the name where the file is.");
                     33:     Read_Name_and_Open_File(file);
                     34:     get(file,lp);
                     35:     Compute_Mixture(lp.all);
                     36:   end Main_Test;
                     37:
                     38: begin
                     39:   new_line;
                     40:   put_line("Testing the computation of the type of mixture.");
                     41:   new_line;
                     42:   loop
                     43:     Main_Test;
                     44:     put("Do you want more tests ? (y/n) "); get(ans);
                     45:     exit when ans /= 'y';
                     46:     skip_line;
                     47:     Symbol_Table.Clear;
                     48:   end loop;
                     49: end ts_mixture;

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>