Annotation of OpenXM_contrib/PHC/Ada/Root_Counts/Symmetry/symmetry_group.ads, Revision 1.1
1.1 ! maekawa 1: with Generic_Lists;
! 2: with Permutations; use Permutations;
! 3:
! 4: package Symmetry_Group is
! 5:
! 6: -- DESCRIPTION :
! 7: -- This package offers operations on elements of a symmetry group.
! 8:
! 9: package Lists_of_Permutations is new Generic_Lists(Link_to_Permutation);
! 10: type List_of_Permutations is new Lists_of_Permutations.List;
! 11:
! 12: -- CONSTRUCTORS :
! 13:
! 14: procedure Add ( l : in out List_of_Permutations; p : in Permutation );
! 15:
! 16: -- DESCRIPTION :
! 17: -- Adds the permutation p to the front of the list l.
! 18:
! 19: procedure Append ( first,last : in out List_Of_Permutations;
! 20: p : in Permutation );
! 21:
! 22: -- DESCRIPTION :
! 23: -- appends the permutation p to the list l1
! 24:
! 25: -- ON ENTRY :
! 26: -- first a list of permutations;
! 27: -- last a pointer to the last element of the list first;
! 28: -- p a permutation.
! 29:
! 30: -- ON RETURN :
! 31: -- first the list to which p has been appended;
! 32: -- last points to the last element of first.
! 33:
! 34: function Union ( a,b : List_of_Permutations ) return List_of_Permutations;
! 35:
! 36: -- DESCRIPTION :
! 37: -- Returns the union of the two groups.
! 38:
! 39: function SymGrp ( n : natural ) return List_of_Permutations;
! 40:
! 41: -- DESCRIPTION :
! 42: -- Return the transpositions that generate the full symmetry group
! 43: -- of all permutations.
! 44:
! 45: function Generate ( g : List_of_Permutations ) return List_Of_Permutations;
! 46:
! 47: -- DESCRIPTION :
! 48: -- This functions returns all possible permutations generated by g.
! 49:
! 50: -- SELECTORS :
! 51:
! 52: function Number ( l : List_of_Permutations ) return natural;
! 53:
! 54: -- DESCRIPTION :
! 55: -- Returns the number of elements in l.
! 56:
! 57: function Is_In ( l : List_of_Permutations; p : Permutation ) return boolean;
! 58:
! 59: -- DESCRIPTION :
! 60: -- Returns true if the permutation p belongs to the list l, returns false
! 61: -- when this is not the case.
! 62:
! 63: generic
! 64:
! 65: with procedure Process ( p : in Permutation; continue : in out boolean );
! 66:
! 67: procedure Iterator ( l : in List_of_Permutations );
! 68:
! 69: -- DESCRIPTION :
! 70: -- This iterator allows to enumerate all the elements
! 71: -- in the list of permutations.
! 72:
! 73: -- DESTRUCTOR :
! 74:
! 75: procedure Clear ( l : in out List_of_Permutations );
! 76:
! 77: -- DESCRIPTION :
! 78: -- Deallocates the memory space occupied by the list of permutations.
! 79:
! 80: end Symmetry_Group;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>