@---------------------------------------------------------------------------
@---------------------------------------------------------------------------
@ FILE: orb_division.c
@---------------------------------------------------------------------------
@---------------------------------------------------------------------------
@
@ matrix_TYP *orbit_representatives(M, Manz, G, option, orbit_no, is_sorted)
@ matrix_TYP **M;
@ bravais_TYP *G;
@ int *option, Manz, *orbit_no;
@ int is_sorted;
@
@  The function 'orbit_representatives' calculates representatives
@  of a group 'G' (*bravais_TYP) on a set 'M' (**matrix_TYP) of matrices.
@  'Manz' denotes the number of matrices in 'M'.
@  The number of representatives is return via the pointer (int *orbit_no).
@  If the set 'M' is sorted (with respect to the order defined in the
@  function 'cmp_mat()') the function makes use of it by searching
@  orbit elements in a sorted list.
@  if is_sorted = 1, it is assumed that 'M' is sorted.
@                    CAUTION: This is not checked !
@                    So is_sorted = 1 for unsorted 'M' yields a wrong result.
@  if is_sorted = 0, it is assumed that 'M' is unsorted.
@   
@  The options are the same as in 'orbit_alg'.
@---------------------------------------------------------------------------
@---------------------------------------------------------------------------
@ FILE: orbit_alg.c
@---------------------------------------------------------------------------
@---------------------------------------------------------------------------
@
@---------------------------------------------------------------------------
@ matrix_TYP **orbit_alg(M, G, S, option, length)
@ bravais_TYP *G, *S;
@ matrix_TYP *M;
@ int *option, *length;
@ 
@ 'orbit_alg calculates the orbit of the matrix M under the group G.
@ 
@  The length of the orbit is returned by the pointer 'length'.
@  It is possible to calculate the stabiliser of M in G.
@  It is returned in the pointer 'S' which has to be allocated as '*bravais_TYP'
@  before calling the function.
@ 
@  'option' is an array of size 5.
@  The following options are possible:
@ 
@  option[0] = 0: the group operates from the left: x->gx
@  option[0] = 1: the group operates from the right: x->xg
@  option[0] = 2: the group operates via x-> g x g^(tr) (from the left)
@  option[0] = 3: the group operates via x-> g^(tr) x g (from the right)
@  option[0] = 4: the group operates by conjugation: x-> g x g^(-1)
@                 (from the left)
@  option[0] = 5: the group operates by conjugation: x-> g^(-1) x g
@                 (from the right)
@ 
@  option[1] = 1: the group operates on the pairs {M, -M} 
@  option[1] = 2: the group  caluluates the orbit of the set of rows of M;
@  option[1] = 3: combination of 1 and 2.
@  option[1] = 4: the group operates on sublattices of Z^n.
@
@  option[2] = 0: the whole orbit is calculated
@  option[2] = n: only the first n elements of the orbit are calculated
@
@  option[3] = 1: the stabiliser is calculated.
@
@  option[4] = 0: the full stabiliser is calculated.
@  option[4] = n: only the first n elements of the stabiliser are calculated
@  option[4] = -n: only the first n elements of the stabiliser are calculated,
@                  afterwards the algorithm is stopped.
@
@  option[5] = 1: Also the inverse of the generators are used in the algorithmn.
@
@---------------------------------------------------------------------------
@
@---------------------------------------------------------------------------
@---------------------------------------------------------------------------
@ FILE: orbit_subdivision.c
@---------------------------------------------------------------------------
@---------------------------------------------------------------------------
@
@---------------------------------------------------------------------------
@ int *orbit_subdivision(vecs, G, orbit_no)
@ matrix_TYP *vecs;
@ bravais_TYP *G;
@ int *orbit_no;
@
@ 'orbit_subdivision' calculates representatives of the orbit
@ of the group 'G' on the rows of the matrix 'vecs'
@ The action is assumed to be v -> vg^{tr} for v a row of 'vecs'
@ and g in 'G'.
@ It is assumed that -Identity is an element of 'G'
@ and for a row v the -v must not be contained as a row of 'vecs'.
@ Furthermore it is assumed, that the rows of 'vecs' are closed under
@ the action of 'G', so if vg^{tr} or -vg^{tr} is no row of 'vecs'
@ the programm exits (v rows of 'vecs'. g in 'G').
@ 
@ The number of orbits is returned via (int *orbit_no) and
@ the result is a pointer to integer of length 'orbit_no'
@ where the i-th entry of this pointer is the number of the
@ row of 'vecs' that is an representative of the i-th orbit.
@
@---------------------------------------------------------------------------
@
@
@ --------------------------------------------------------------------------
@
@ FILE: row_spin.c
@
@ --------------------------------------------------------------------------
@
@
@-------------------------------------------------------------------------
@
@ matrix_TYP *row_spin(matrix_TYP *x,matrix_TYP **G,int no,int option)
@
@ The function calculates a basis for the R module <x_i>_RG, where
@ x_i are the rows of x, G is assumed to be generated by the matrices G[i]
@ for 0 <= i <= no, and R is one of the rings Z or Q.
@ NOTE: this function will handle non integral matrices in G[i] as well.
@
@ matrix_TYP  *x: see above. x is changed via kgv2rat and long_row_hnf.
@ matrix_TYP **G: see above. It is also changed by rat2kgv for each entry in G.
@ int no        : will not be changed.
@ option        : drives the behaviour of the function. in case
@                 option % 2 == 0 it performs a Z-spinning algorithm,
@                 option % 2 == 1 it performs a Q-spinning algorithm,
@                 option % 4 == 0 perform a pair_red after spinning
@                                 the lattice. ONLY IN CONJUNCTION WITH
@                                 Z-spinning
@-------------------------------------------------------------------------
@
@ bravais_TYP *representation_on_lattice(matrix_TYP *x,bravais_TYP *G,
@                                        int option)
@
@
@
@----------------------------------------------------------------------------
@
@ matrix_TYP *translation_lattice(matrix_TYP **G,int number,matrix_TYP *P)
@
@ Calculates a basis of the translation lattice of the space group
@ generated by the matrices given in G[i], 0<= i < number.
@ This lattice is returned via a matrix containing the columns of a basis
@ of the lattice (without the affine '1').
@
@ matrix_TYP **G : Generators for the spacegroup.
@ int number     : see above
@ matrix_TYP *P  : a matrix containing a presentation for the point group
@                  to the space group. It has to be a presentation according
@                  to the generators G[i], i.e { G[i] * T }/T fullfill
@                  the relations given in P.
@
@----------------------------------------------------------------------------
@
