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

Annotation of OpenXM_contrib/PHC/Ada/Root_Counts/Symmetry/orbits_of_solutions_io.adb, Revision 1.1.1.1

1.1       maekawa     1: with integer_io;                         use integer_io;
                      2:
                      3: package body Orbits_of_Solutions_io is
                      4:
                      5:   procedure put ( lorb : in List_of_Orbits ) is
                      6:   begin
                      7:     put(Standard_Output,lorb);
                      8:   end put;
                      9:
                     10:   procedure put ( file : in file_type; lorb : in List_of_Orbits ) is
                     11:
                     12:     tmp : List_of_Orbits;
                     13:     totgen,totsols : natural;
                     14:
                     15:   begin
                     16:     tmp := lorb;
                     17:     if not Is_Null(lorb)
                     18:      then put_line(file,"------------------------------------------------");
                     19:           put_line(file,"|    ORBIT INFORMATION OF LIST OF SOLUTIONS    |");
                     20:          put_line(file,"------------------------------------------------");
                     21:          put_line(file,"|       TYPE        | NB <> | NB GEN | NB SOLS |");
                     22:          put_line(file,"------------------------------------------------");
                     23:          totgen := 0;
                     24:          totsols := 0;
                     25:           while not Is_Null(tmp) loop
                     26:             declare
                     27:              n : natural := Head_Of(tmp).n;
                     28:              orbi : Orbit(n) := Head_Of(tmp).all;
                     29:             begin
                     30:              put(file,"|  ");
                     31:              for i in orbi.orb'range loop
                     32:                put(file,orbi.orb(i),1);
                     33:                put(file,' ');
                     34:              end loop;
                     35:              for i in 1..(17-2*n) loop
                     36:                put(file,' ');
                     37:               end loop;
                     38:              put(file,"|  ");
                     39:              put(file,orbi.nbdiff,2);
                     40:              put(file,"   |   ");
                     41:              put(file,orbi.nbgen,2);  totgen := totgen + orbi.nbgen;
                     42:              put(file,"   |   ");
                     43:              put(file,orbi.nbsols,3); totsols := totsols + orbi.nbsols;
                     44:              put_line(file,"   |");
                     45:             end;
                     46:             tmp := Tail_Of(tmp);
                     47:           end loop;
                     48:          put_line(file,"------------------------------------------------");
                     49:          put(file,"| Total number of generating solutions : ");
                     50:          put(file,totgen,4); put_line(file,"  |");
                     51:          put(file,"| Total number of solutions generated  : ");
                     52:          put(file,totsols,4); put_line(file,"  |");
                     53:          put_line(file,"------------------------------------------------");
                     54:     end if;
                     55:   end put;
                     56:
                     57: end Orbits_of_Solutions_io;

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