# A permutation group which acts on a [[polytope::Cone|Cone]] by permuting
# (1) its [[polytope::Cone::RAYS|RAYS]] ([[DOMAIN]]=>1), (2) its [[polytope::Cone::FACETS|FACETS]] ([[DOMAIN]]=>2), or (3) the coordinates ([[DOMAIN]]=>3). 
declare object GroupOfCone : Group  {

method construct(Group,$$@) { &Core::Object::new_filled_copy } 

#FIXME: Domain als template? declare object GroupOfCone<Domain> : Group  {
#For Polytope: declare object GroupOfPolytope<Domain> : GroupOfCone<Domain>  {

# @category Symmetry
# Indicates on which domain the group action is defined, see Enum defined in
# 'apps/polytope/rules/permlib.rules'.
#	 OnRays=1: action on the (indices of the) rays
#	 OnFacets=2: action on the facets
#	 OnCoords=3: action on the coordinates 
property DOMAIN : Int;

# @category Symmetry
# The symmetrized facets of the cone. Same order as in the [[polytope::Cone::FACETS|FACETS]]-section.
#
# Explanation: The symmetry group of a cone also act on the facets.
#   If the cone is not full-dimensional, however, the facets may appear
#   unsymmetric. Nevertheless, there always exists some symmetric facet description.
property SYMMETRIC_FACETS : Matrix<Rational>;

# @category Symmetry
# The symmetrized rays of the cone. Same order as in the [[polytope::Cone::RAYS|RAYS]]-section.
# Explanation: The symmetry group of a cone also act on the rays.
#   If the cone has a non-trivial lineality space, however, the rays may appear
#   unsymmetric. Nevertheless, there always exists some symmetric ray description.
property SYMMETRIC_RAYS : Matrix<Rational>;

# @category Symmetry
# An array that contains a set of indices (of rays) for each orbit of rays. 
# The indices of the rays correspond to their indices in the polymake object.
property RAYS_IN_ORBITS : Array< Set<Int> >;

# @category Symmetry
# The number of orbits of rays.
property N_ORBITS_OF_RAYS : Int;

# @category Symmetry
# An array that contains a set of indices (of facets) for each orbit of facets. 
# The indices of the facets correspond to their indices in the polymake object.
property FACETS_IN_ORBITS : Array< Set<Int> >;

# @category Symmetry
# The number of orbits of facets.
property N_ORBITS_OF_FACETS : Int;

# @category Symmetry
# An array that contains a set of indices (of rays) for each orbit of coordinates. 
property COORDINATES_IN_ORBITS : Array< Set<Int> >;

# @category Symmetry
# The number of orbits of coordinates.
property N_ORBITS_OF_COORDINATES : Int;

# @category Symmetry
# An array that contains a set of indices (of input rays) for each orbit of rays. 
# The indices of the input rays correspond to their indices in the polymake object.
property INPUT_RAYS_IN_ORBITS : Array< Set<Int> >;

# @category Symmetry
# The number of orbits of input rays.
property N_ORBITS_OF_INPUT_RAYS : Int;

# @category Symmetry
# An array that contains a set of indices (of inequalities) for each orbit of inequalities. 
# The indices of the inequalities correspond to their indices in the polymake object.
property INEQUALITIES_IN_ORBITS : Array< Set<Int> >;

# @category Symmetry
# The number of orbits of inequalities.
property N_ORBITS_OF_INEQUALITIES : Int;

# FIXME: should be Matrix<Scalar>!

# @category Symmetry
# Representatives for the orbits of facets of the cone under this group action.
# No redundancies are allowed.
#
# FIXME: Could cause problems since representatives are not unique! 
#        The order should correspond to the order of the orbits of facets!
property REPRESENTATIVE_FACETS : Matrix<Rational>;

# @category Symmetry
# The number of facet representatives.
property N_REPRESENTATIVE_FACETS : Int;

# @category Symmetry
# Representatives for the orbits of the linear span of the cone under this group action.
#
# No redundancies are allowed.
# FIXME: Could cause problems since representatives are not unique! 
#        The order should correspond to the order of the orbits of facets!
property REPRESENTATIVE_LINEAR_SPAN : Matrix<Rational>;

# @category Symmetry
# Representatives for the orbits of rays of the cone under this group action.
# No redundancies are allowed.
#
# FIXME: Could cause problems since representatives are not unique! How to do canonicalization?
#        The order should correspond to the order of the orbits of rays!
property REPRESENTATIVE_RAYS : Matrix<Rational>;

# @category Symmetry
# The number of ray representatives.
property N_REPRESENTATIVE_RAYS : Int;


rule initial : GENERATORS : { 
    croak("DOMAIN missing");
}
precondition : !exists(DOMAIN);

}

# Local Variables:
# mode: perl
# c-basic-offset:3
# End:
