#  Copyright (c) 1997-2018
#  Ewgenij Gawrilow, Michael Joswig (Technische Universitaet Berlin, Germany)
#  http://www.polymake.org
#
#  This program is free software; you can redistribute it and/or modify it
#  under the terms of the GNU General Public License as published by the
#  Free Software Foundation; either version 2, or (at your option) any
#  later version: http://www.gnu.org/licenses/gpl.txt.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#-------------------------------------------------------------------------------

object Action {

   # @category Symmetry
   # The generators of the group action
   property GENERATORS : Array<GeneratorType>;

   # @category Symmetry
   # The degree of the representation. For permutation groups,
   # this is the number of permuted indices, for matrix groups
   # it is the dimension of the vector space the group acts on
   property DEGREE : Int;

   # @category Symmetry
   # The character of the action. The ordering corresponds to the
   # columns of the CHARACTER_TABLE
   property CHARACTER : Array<QuadraticExtension>;

   # @category Symmetry
   # The multiplicities of each irreducible representation in this action.
   # The ordering corresponds to the rows of the CHARACTER_TABLE
   property IRREDUCIBLE_DECOMPOSITION : Array<Int>;

   # @category Symmetry
   # A set of representatives for each conjugacy class.
   # The order of these representatives must agree with the implicit
   # order of the columns of the [[Group::CHARACTER_TABLE|CHARACTER_TABLE]].
   property CONJUGACY_CLASS_REPRESENTATIVES : Array<GeneratorType>;

   # @category Symmetry
   # The conjugacy classes themselves
   property CONJUGACY_CLASSES : Array<Set<GeneratorType>>;

   # @category Symmetry
   # All elements of the group, as expressed in the present action
   # Notice that this is a temporary property; it will not be stored in any file.
   property ALL_GROUP_ELEMENTS : Array<GeneratorType>;

   rule ALL_GROUP_ELEMENTS : GENERATORS {
       $this->ALL_GROUP_ELEMENTS(temporary) = all_group_elements($this);
   }

   # @category Symmetry
   # the name of the property that we act on, for example MAX_INTERIOR_SIMPLICES or INTERIOR_RIDGES
   property DOMAIN_NAME : String;

   # @category Symmetry
   # the name of a different action that this action is induced from
   property INDUCED_FROM : String;

   # @category Symmetry
   # The map giving the index of each group element
   # This is a temporary property; it will not be stored in any file.
   property INDEX_OF : HashMap<DomainType, Int>;

   rule INDEX_OF : DOMAIN_NAME {
       my $dom = $this->DOMAIN_NAME;
       $this->INDEX_OF(temporary) = index_of($this->$dom);
   }

   # @category Symmetry
   # The orbits of the domain, represented via their indices
   property ORBITS : Array<Set<Int>>;

   # @category Symmetry
   # The number of orbits in the domain under the group action
   property N_ORBITS : Int;

   # @category Symmetry
   # The cardinality of each orbit
   property ORBIT_SIZES : Array<Int>;

   # @category Symmetry
   # The images of all domain elements under each group element: [ [ g(x) for x in D ] for g in G ]
   property IMAGES : Array<Array<DomainType>>;
   
   # @category Symmetry
   # A set of generators for input rays, stored as the rows of a matrix.
   # The list of generators may be redundant and non-canonical.
   property INPUT_RAYS_GENERATORS : Matrix<OrbitGeneratorScalarType>;
   
   # @category Symmetry
   # The number of generators for orbits.
   property N_INPUT_RAYS_GENERATORS : Int;

   # @category Symmetry
   # A set of generators for rays, stored as the rows of a matrix.
   # The list of generators may be redundant and non-canonical.
   property RAYS_GENERATORS : Matrix<OrbitGeneratorScalarType>;
   
   # @category Symmetry
   # The number of generators for orbits.
   property N_RAYS_GENERATORS : Int;

   # @category Symmetry
   # A set of generators for inequalities, stored as the rows of a matrix.
   # The list of generators may be redundant and non-canonical.
   property INEQUALITIES_GENERATORS : Matrix<OrbitGeneratorScalarType>;
   
   # @category Symmetry
   # The number of generators for orbits.
   property N_INEQUALITIES_GENERATORS : Int;

   # @category Symmetry
   # A set of generators for facets, stored as the rows of a matrix.
   # The list of generators may be redundant and non-canonical.
   property FACETS_GENERATORS : Matrix<OrbitGeneratorScalarType>;
   
   # @category Symmetry
   # The number of generators for orbits.
   property N_FACETS_GENERATORS : Int;

   # @category Symmetry
   # A set of generators for equations, stored as the rows of a matrix.
   # The list of generators may be redundant and non-canonical.
   property EQUATIONS_GENERATORS : Matrix<OrbitGeneratorScalarType>;
   
   # @category Symmetry
   # The number of generators for orbits.
   property N_EQUATIONS_GENERATORS : Int;

   # @category Symmetry
   # A set of generators for input lineality, stored as the rows of a matrix.
   # The list of generators may be redundant and non-canonical.
   property INPUT_LINEALITY_GENERATORS : Matrix<OrbitGeneratorScalarType>;
   
   # @category Symmetry
   # The number of generators for orbits.
   property N_INPUT_LINEALITY_GENERATORS : Int;

   # @category Symmetry
   # A set of generators for input lineality, stored as the rows of a matrix.
   # The list of generators may be redundant and non-canonical.
   property LINEALITY_SPACE_GENERATORS : Matrix<OrbitGeneratorScalarType>;
   
   # @category Symmetry
   # The number of generators for orbits.
   property N_LINEALITY_SPACE_GENERATORS : Int;

   # @category Symmetry
   # A set of generators for the maximal cones of a fan, stored in terms of indices of vertex generators.
   # The list of generators may be redundant and non-canonical.
   property MAXIMAL_CONES_GENERATORS : IncidenceMatrix;
   
   # @category Symmetry
   # The number of generators for orbits.
   property N_MAXIMAL_CONES_GENERATORS : Int;

   
   # @category Symmetry
   # A collection of representatives for each orbit, represented via their indices
   property ORBIT_REPRESENTATIVES : Array<Int>;

   # @category Symmetry
   # Labels for the orbit representatives
   property ORBIT_REPRESENTATIVE_LABELS : Array<String> : mutable;
   
   # @category Symmetry
   # the representatives of orbits explicitly, not via their indices
   property EXPLICIT_ORBIT_REPRESENTATIVES : Array<DomainType>;

   # @category Symmetry
   # the representatives of orbits explicitly, not via their indices
   property EXPLICIT_ORBIT_REPRESENTATIVE_MATRIX : Matrix<OrbitGeneratorScalarType>;

   # @category Symmetry
   # the number of representatives of orbits
   property N_ORBIT_REPRESENTATIVES : Int;

   # @category Symmetry
   # A permutation that orders the domain elements by orbits
   property PERMUTATION_TO_ORBIT_ORDER : Array<Int>;

}

# Local Variables:
# mode: perl
# cperl-indent-level:3
# indent-tabs-mode:nil
# End:
