[BACK]Return to symmetry_group.ads 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.ads (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 Generic_Lists;
with Permutations;                       use Permutations;

package Symmetry_Group is

-- DESCRIPTION :
--   This package offers operations on elements of a symmetry group.

  package Lists_of_Permutations is new Generic_Lists(Link_to_Permutation);
  type List_of_Permutations is new Lists_of_Permutations.List;

-- CONSTRUCTORS :

  procedure Add ( l : in out List_of_Permutations; p : in Permutation );

  -- DESCRIPTION :
  --   Adds the permutation p to the front of the list l.

  procedure Append ( first,last : in out List_Of_Permutations;
                     p : in Permutation );

  -- DESCRIPTION :
  --   appends the permutation p to the list l1

  -- ON ENTRY :
  --   first        a list of permutations;
  --   last         a pointer to the last element of the list first;
  --   p            a permutation.

  -- ON RETURN :
  --   first        the list to which p has been appended;
  --   last         points to the last element of first.

  function Union ( a,b : List_of_Permutations ) return List_of_Permutations;

  -- DESCRIPTION :
  --   Returns the union of the two groups.

  function SymGrp ( n : natural ) return List_of_Permutations;

   -- DESCRIPTION :
   --   Return the transpositions that generate the full symmetry group
   --   of all permutations.

  function Generate ( g : List_of_Permutations ) return List_Of_Permutations;
  
  -- DESCRIPTION :
  --   This functions returns all possible permutations generated by g.

-- SELECTORS :

  function Number ( l : List_of_Permutations ) return natural;

  -- DESCRIPTION :
  --   Returns the number of elements in l.

  function Is_In ( l : List_of_Permutations; p : Permutation ) return boolean;

  -- DESCRIPTION :
  --   Returns true if the permutation p belongs to the list l, returns false
  --   when this is not the case.

  generic

    with procedure Process ( p : in Permutation; continue : in out boolean );

  procedure Iterator ( l : in List_of_Permutations );

  -- DESCRIPTION :
  --   This iterator allows to enumerate all the elements
  --   in the list of permutations.

-- DESTRUCTOR :

  procedure Clear ( l : in out List_of_Permutations );

  -- DESCRIPTION :
  --   Deallocates the memory space occupied by the list of permutations.

end Symmetry_Group;