2
* gfanlib_symmetriccomplex.h
4
* Created on: Nov 16, 2010
8
#ifndef GFANLIB_SYMMETRICCOMPLEX_H_INCLUDED
9
#define GFANLIB_SYMMETRICCOMPLEX_H_INCLUDED
15
#include "gfanlib_symmetry.h"
16
#include "gfanlib_matrix.h"
17
#include "gfanlib_zcone.h"
20
enum FanPrintingFlags{
21
FPF_conesCompressed=1,
28
FPF_multiplicities=128,
31
FPF_primitiveRays=1024,
36
class SymmetricComplex{
38
ZMatrix linealitySpace;
40
std::map<ZVector,int> indexMap;
42
IntVector dimensionsAtInfinity()const;
44
int getAmbientDimension()const{return n;}
47
bool isKnownToBeNonMaximalFlag;
49
IntVector indices;//always sorted
50
Cone(std::set<int> const &indices_, int dimension_, Integer multiplicity_, bool sortWithSymmetry, SymmetricComplex const &complex);
51
std::set<int> indexSet()const;
54
bool isKnownToBeNonMaximal()const{return isKnownToBeNonMaximalFlag;}
55
void setKnownToBeNonMaximal(){isKnownToBeNonMaximalFlag=true;}
56
bool isSubsetOf(Cone const &c)const;
57
SymmetricComplex::Cone permuted(Permutation const &permutation, SymmetricComplex const &complex, bool withSymmetry)const;
59
Permutation sortKeyPermutation;
60
bool operator<(const Cone & b)const;
61
bool isSimplicial(int linealityDim)const;
62
void remap(SymmetricComplex &complex);
64
* This routine computes a basis for the orthogonal complement of the cone.
65
* Notice that the lineality space, which is unknown at the time, is ignored.
66
* This routine is deterministic and used for orienting the faces when computing homology.
68
ZMatrix orthogonalComplement(SymmetricComplex &complex)const;
70
typedef std::set<Cone> ConeContainer;
73
SymmetricComplex(ZMatrix const &rays, ZMatrix const &linealitySpace, SymmetryGroup const &sym_);
75
* Returns a reference to the matrix of vertices on which the complex is build.
76
* The reference is valid as the Symmetric complex object exists.
78
ZMatrix const &getVertices()const{return vertices;}
79
bool contains(Cone const &c)const;
80
void insert(Cone const &c);
83
bool isMaximal(Cone const &c)const;
85
ZVector fvector(bool boundedPart=false)const;
86
void buildConeLists(bool onlyMaximal, bool compressed, std::vector<std::vector<IntVector > >*conelist/*, ZMatrix *multiplicities*/)const;
87
std::string toStringJustCones(int dimLow, int dimHigh, bool onlyMaximal, bool group, std::ostream *multiplicities=0, bool compressed=false, bool tPlaneSort=false)const;
88
std::string toString(int flags=0)const;
89
bool isSimplicial()const;
91
Calling this function will change the representative of each cone
92
orbit by "applying" the permutation which will give the sortkey to
93
the set of indices of the cone.
97
* Looks up the index of the vector among the vertices.
99
int indexOfVertex(ZVector const &v)const;
100
int numberOfConesOfDimension(int d)const;
102
* Given a cone this returns its index among all cones of that dimension.
103
* Used for assigning "names" to cones.
105
int dimensionIndex(Cone const &c);
108
* This routine is used for constructing the boundary map for homology computations.
110
void boundary(Cone const &c, IntVector &indices, IntVector &signs);
112
* This routine computes the ith boundary map for homology as a matrix.
114
ZMatrix boundaryMap(int i);
116
ZCone makeZCone(IntVector const &indices)const;