Annotation of OpenXM_contrib/PHC/Ada/Root_Counts/Symmetry/orbits_of_solutions.ads, Revision 1.1
1.1 ! maekawa 1: with text_io; use text_io;
! 2: with Standard_Floating_Numbers; use Standard_Floating_Numbers;
! 3: with Generic_Lists;
! 4: with Standard_Complex_Solutions; use Standard_Complex_Solutions;
! 5: with Permutations,Symmetry_Group; use Permutations,Symmetry_Group;
! 6:
! 7: package Orbits_of_Solutions is
! 8:
! 9: -- DESCRIPTION :
! 10: -- This package contains routines for manipulating the
! 11: -- solutions set of a symmetric polynomial system.
! 12:
! 13: -- DATA STRUCTURES :
! 14:
! 15: type Orbit ( n : natural ) is record
! 16: orb : Permutation(1..n); -- data representing the orbit
! 17: -- e.g.: orb = [ 1 1 2 2 ] => solution is like (a,a,b,b) or (a,b,a,b)
! 18: nbdiff : natural; -- number of different values
! 19: nbgen : natural; -- number of generating solutions
! 20: nbsols : natural; -- number of solutions in the orbit
! 21: end record;
! 22:
! 23: type Link_to_Orbit is access Orbit;
! 24:
! 25: package Lists_of_Orbits is new Generic_Lists(Link_to_Orbit);
! 26: type List_of_Orbits is new Lists_of_Orbits.List;
! 27:
! 28: -- CONSTRUCTORS :
! 29:
! 30: function Generating ( sols : Solution_List; sign : boolean;
! 31: tol : double_float ) return Solution_List;
! 32:
! 33: -- DESCRIPTION :
! 34: -- Returns a list of generating solutions, by permutations, all
! 35: -- other solutions in sols can be derived from the resulting list.
! 36: -- If sign is true, then also permutations who alter the sign of
! 37: -- the components are tried.
! 38:
! 39: procedure Analyze ( l : in List_of_Permutations; sign : in boolean;
! 40: tol : in double_float; sols : in out Solution_List );
! 41:
! 42: -- DESCRIPTION :
! 43: -- the solution list sols will be checked upon symmetry, according
! 44: -- to the list of permutations l
! 45:
! 46: -- ON ENTRY :
! 47: -- l a list of permutations;
! 48: -- sign if true then sign symmetry has to be taken into account;
! 49: -- tol tolerance to decide wether two solutions are equal;
! 50: -- sols a list of solutions.
! 51:
! 52: -- ON RETURN :
! 53: -- sols a list of solutions, where only one element per orbit
! 54: -- is in the list;
! 55: -- the multiplicity field is used to indicate the number
! 56: -- of elements in the orbit.
! 57:
! 58: procedure Orbit_Structure
! 59: ( s : in Solution; tol : in double_float;
! 60: orbit : in out Permutation; nbdiff : out natural);
! 61:
! 62: -- DESCRIPTION :
! 63: -- This procedure returns the structure of the orbit of the solution.
! 64:
! 65: -- ON ENTRY :
! 66: -- s a solution;
! 67: -- tol tolerance to decide wether two solutions are equal.
! 68:
! 69: -- ON RETURN :
! 70: -- orbit orbit(i) = j means that x_i has the same value as x_j;
! 71: -- nbdiff the number of different values in the orbit.
! 72:
! 73: function Orbits ( sols : Solution_List; tol : double_float )
! 74: return Permutation;
! 75:
! 76: -- DESCRIPTION :
! 77: -- Let orb := Orbits(sols,tol),
! 78: -- then orb(i) gives the number of solutions belonging to an orbit
! 79: -- with i different values.
! 80:
! 81: -- ON ENTRY :
! 82: -- sols a list of solutions;
! 83: -- tol tolerance to decide wether two solutions are equal.
! 84:
! 85: procedure Orbits ( grp : in List_of_Permutations; tol : in double_float;
! 86: sols : in out Solution_List;
! 87: lorb : in out List_of_Orbits );
! 88:
! 89: -- DESCRIPTION :
! 90: -- The list of solutions will be analyzed according to the
! 91: -- symmetry group. Together with the information on the orbits,
! 92: -- the list of generating solutions will be produced.
! 93:
! 94: -- ON ENTRY :
! 95: -- grp a list of permutations representing the symmetry group;
! 96: -- tol used to compare two solutions;
! 97: -- sols the list of solutions.
! 98:
! 99: -- ON RETURN :
! 100: -- sols the generating list of solutions;
! 101: -- lorb the list containing the information of the orbits.
! 102:
! 103: -- SELECTOR :
! 104:
! 105: function Same_Orbit ( orb1,orb2 : Permutation ) return boolean;
! 106:
! 107: -- DESCRIPTION :
! 108: -- Returns true when the structures of the orbits are the same.
! 109: -- For example : 1 1 1 2 = 1 2 1 1, but 1 1 2 2 /= 2 2 1 2.
! 110:
! 111: -- DESTRUCTOR :
! 112:
! 113: procedure Clear ( lorb : in out List_of_Orbits );
! 114:
! 115: -- DESCRIPTION :
! 116: -- All memory space allocated for lorb will be freed.
! 117:
! 118: end Orbits_of_Solutions;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>