#ifndef SYMMETRICCOMPLEX_H_INCLUDED #define SYMMETRICCOMPLEX_H_INCLUDED #include <set> #include <string> #include <map> using namespace std; #include "symmetry.h" #include "matrix.h" class SymmetricComplex{ int n; IntegerMatrix vertices; map<IntegerVector,int> indexMap; SymmetryGroup sym; IntegerVector dimensionsAtInfinity()const; public: class Cone { bool isKnownToBeNonMaximalFlag; // bool ignoreSymmetry; //useful when computing faces and extracting symmetries public: vector<int> indices;//always sorted Cone(set<int> const &indices_, int dimension_, int multiplicity_, bool sortWithSymmetry, SymmetricComplex const &complex); set<int> indexSet()const; int dimension; int multiplicity; bool isKnownToBeNonMaximal()const{return isKnownToBeNonMaximalFlag;} void setKnownToBeNonMaximal(){isKnownToBeNonMaximalFlag=true;} bool isSubsetOf(Cone const &c)const; SymmetricComplex::Cone permuted(IntegerVector const &permutation, SymmetricComplex const &complex, bool withSymmetry)const; // bool operator<(Cone const & b)const; /* IntegerVector relativeInteriorPoint; IntegerVector smallestRepresentative; IntegerVector summary;*/ IntegerVector sortKey; // void computeRelativeInteriorPoint(SymmetricComplex const &complex); // void computeSmallestRepresentative(SymmetricComplex const &complex); bool operator<(const Cone & b)const; // void setIgnoreSymmetry(bool b){ignoreSymmetry=b;} bool isSimplicial(int linealityDim)const; void remap(SymmetricComplex &complex); }; typedef set<Cone> ConeContainer; ConeContainer cones; SymmetricComplex(int n_, IntegerVectorList const &v, SymmetryGroup const &sym_); IntegerMatrix const &getVertices()const{return vertices;} bool contains(Cone const &c)const; void insert(Cone const &c); int getMaxDim()const; int getMinDim()const; bool isMaximal(Cone const &c)const; bool isPure()const; IntegerVector fvector(bool boundedPart=false)const; string toString(int dimLow, int dimHigh, bool onlyMaximal, bool group, ostream *multiplicities=0, bool compressed=false, bool tPlaneSort=false)const; bool isSimplicial()const; /** Calling this function will change the representative of each cone orbit by "applying" the permutation which will give the sortkey to the set of indices of the cone. */ void remap(); }; #endif