[BACK]Return to symmetry_group_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/symmetry_group_io.adb, Revision 1.1

1.1     ! maekawa     1: with integer_io;                         use integer_io;
        !             2:
        !             3: package body Symmetry_Group_io is
        !             4:
        !             5:   procedure get ( p : out Permutation ) is
        !             6:   begin
        !             7:     get(Standard_Input,p);
        !             8:   end get;
        !             9:
        !            10:   procedure get ( file : in file_type; p : out Permutation ) is
        !            11:   begin
        !            12:     for i in p'range loop
        !            13:       get(file,p(i));
        !            14:     end loop;
        !            15:   end get;
        !            16:
        !            17:   procedure get ( l : in out List_of_Permutations; n,nb : in natural ) is
        !            18:   begin
        !            19:     get(Standard_Input,l,n,nb);
        !            20:   end get;
        !            21:
        !            22:   procedure get ( file : in file_type;
        !            23:                  l : in out List_of_Permutations; n,nb : in natural ) is
        !            24:
        !            25:     p : Permutation(1..n);
        !            26:     l2 : List_of_Permutations;
        !            27:
        !            28:   begin
        !            29:     for i in 1..nb loop
        !            30:       get(file,p);
        !            31:       if Is_Permutation(p)
        !            32:        then Append(l,l2,p);
        !            33:       end if;
        !            34:     end loop;
        !            35:   end get;
        !            36:
        !            37:   procedure put ( p : in Permutation ) is
        !            38:   begin
        !            39:     put(Standard_Output,p);
        !            40:   end put;
        !            41:
        !            42:   procedure put ( file : in file_type; p : in Permutation ) is
        !            43:   begin
        !            44:     for i in p'range loop
        !            45:       put(file,' '); put(file,p(i),1);
        !            46:     end loop;
        !            47:   end put;
        !            48:
        !            49:   procedure put ( l : in List_of_Permutations ) is
        !            50:   begin
        !            51:     put(Standard_Output,l);
        !            52:   end put;
        !            53:
        !            54:   procedure put ( file : in file_type; l : in List_of_Permutations ) is
        !            55:
        !            56:     temp : List_of_Permutations := l;
        !            57:
        !            58:   begin
        !            59:     while not Is_Null(temp) loop
        !            60:       put(file,Permutation(Head_Of(temp).all));
        !            61:       new_line(file);
        !            62:       temp := Tail_Of(temp);
        !            63:     end loop;
        !            64:   end put;
        !            65:
        !            66: end Symmetry_Group_io;

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