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

File: [local] / OpenXM_contrib / PHC / Ada / Root_Counts / Symmetry / symmetry_group_io.adb (download)

Revision 1.1.1.1 (vendor branch), Sun Oct 29 17:45:31 2000 UTC (23 years, 7 months ago) by maekawa
Branch: PHC, MAIN
CVS Tags: v2, maekawa-ipv6, RELEASE_1_2_3, RELEASE_1_2_2_KNOPPIX_b, RELEASE_1_2_2_KNOPPIX, RELEASE_1_2_2, RELEASE_1_2_1, HEAD
Changes since 1.1: +0 -0 lines

Import the second public release of PHCpack.

OKed by Jan Verschelde.

with integer_io;                         use integer_io;

package body Symmetry_Group_io is

  procedure get ( p : out Permutation ) is
  begin
    get(Standard_Input,p);
  end get;

  procedure get ( file : in file_type; p : out Permutation ) is
  begin
    for i in p'range loop
      get(file,p(i));
    end loop;
  end get;

  procedure get ( l : in out List_of_Permutations; n,nb : in natural ) is
  begin
    get(Standard_Input,l,n,nb);
  end get;

  procedure get ( file : in file_type;
		  l : in out List_of_Permutations; n,nb : in natural ) is

    p : Permutation(1..n);
    l2 : List_of_Permutations;

  begin
    for i in 1..nb loop
      get(file,p);
      if Is_Permutation(p)
       then Append(l,l2,p);
      end if;
    end loop;
  end get;
      
  procedure put ( p : in Permutation ) is
  begin
    put(Standard_Output,p);
  end put;

  procedure put ( file : in file_type; p : in Permutation ) is
  begin
    for i in p'range loop
      put(file,' '); put(file,p(i),1);
    end loop;
  end put;

  procedure put ( l : in List_of_Permutations ) is
  begin
    put(Standard_Output,l);
  end put;

  procedure put ( file : in file_type; l : in List_of_Permutations ) is

    temp : List_of_Permutations := l;

  begin
    while not Is_Null(temp) loop
      put(file,Permutation(Head_Of(temp).all));
      new_line(file);
      temp := Tail_Of(temp);
    end loop;
  end put;

end Symmetry_Group_io;