~ubuntu-branches/ubuntu/saucy/gfan/saucy-proposed

« back to all changes in this revision

Viewing changes to symmetriccomplex.h

  • Committer: Package Import Robot
  • Author(s): Cédric Boutillier
  • Date: 2013-07-09 10:44:01 UTC
  • mfrom: (2.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20130709104401-5q66ozz5j5af0dak
Tags: 0.5+dfsg-3
* Upload to unstable.
* modify remove_failing_tests_on_32bits.patch to replace command of
  0009RenderStairCase test with an empty one instead of deleting it.
* remove lintian override about spelling error

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
  IntegerMatrix vertices;
16
16
  map<IntegerVector,int> indexMap;
17
17
  SymmetryGroup sym;
 
18
  IntegerVector dimensionsAtInfinity()const;
18
19
 public:
19
 
  class Cone : public set<int>
 
20
  class Cone
20
21
  {
 
22
    bool isKnownToBeNonMaximalFlag;
 
23
    //    bool ignoreSymmetry; //useful when computing faces and extracting symmetries
21
24
  public:
 
25
    vector<int> indices;//always sorted
 
26
    Cone(set<int> const &indices_, int dimension_, int multiplicity_, bool sortWithSymmetry, SymmetricComplex const &complex);
 
27
    set<int> indexSet()const;
22
28
    int dimension;
23
29
    int multiplicity;
 
30
    bool isKnownToBeNonMaximal()const{return isKnownToBeNonMaximalFlag;}
 
31
    void setKnownToBeNonMaximal(){isKnownToBeNonMaximalFlag=true;}
24
32
    bool isSubsetOf(Cone const &c)const;
25
 
    SymmetricComplex::Cone permuted(IntegerVector const &permutation, SymmetricComplex const &complex)const;
 
33
    SymmetricComplex::Cone permuted(IntegerVector const &permutation, SymmetricComplex const &complex, bool withSymmetry)const;
 
34
    //    bool operator<(Cone const & b)const;
 
35
    /*    IntegerVector relativeInteriorPoint;
 
36
    IntegerVector smallestRepresentative;
 
37
    IntegerVector summary;*/
 
38
    IntegerVector sortKey;
 
39
    IntegerVector sortKeyPermutation;
 
40
    //    void computeRelativeInteriorPoint(SymmetricComplex const &complex);
 
41
    //    void computeSmallestRepresentative(SymmetricComplex const &complex);
 
42
    bool operator<(const Cone & b)const;
 
43
    //    void setIgnoreSymmetry(bool b){ignoreSymmetry=b;}
 
44
    bool isSimplicial(int linealityDim)const;
 
45
    void remap(SymmetricComplex &complex);
 
46
/**
 
47
 * This routine computes a basis for the orthogonal complement of the cone.
 
48
 * Notice that the lineality space, which is unknown at the time, is ignored.
 
49
 * This routine is deterministic and used for orienting the faces when computing homology.
 
50
 */
 
51
    IntegerVectorList orthogonalComplement(SymmetricComplex &complex)const;
26
52
  };
27
 
  list<Cone> cones;
 
53
  typedef set<Cone> ConeContainer;
 
54
  ConeContainer cones;
 
55
  int dimension;
28
56
  SymmetricComplex(int n_, IntegerVectorList const &v, SymmetryGroup const &sym_);
 
57
  /**
 
58
   * Returns a reference to the matrix of vertices on which the complex is build.
 
59
   * The reference is valid as the Symmetric complex object exists.
 
60
   */
 
61
  IntegerMatrix const &getVertices()const{return vertices;}
29
62
  bool contains(Cone const &c)const;
30
63
  void insert(Cone const &c);
31
64
  int getMaxDim()const;
32
65
  int getMinDim()const;
33
66
  bool isMaximal(Cone const &c)const;
34
67
  bool isPure()const;
35
 
  IntegerVector fvector()const;
36
 
  string toString(int dimLow, int dimHigh, bool onlyMaximal, bool group, ostream *multiplicities=0)const;
 
68
  IntegerVector fvector(bool boundedPart=false)const;
 
69
  string toString(int dimLow, int dimHigh, bool onlyMaximal, bool group, ostream *multiplicities=0, bool compressed=false, bool tPlaneSort=false, bool xml=false)const;
 
70
  bool isSimplicial()const;
 
71
  /**
 
72
     Calling this function will change the representative of each cone
 
73
     orbit by "applying" the permutation which will give the sortkey to
 
74
     the set of indices of the cone.
 
75
   */
 
76
  void remap();
 
77
  /**
 
78
   * Looks up the index of the vector among the vertices.
 
79
   */
 
80
  int indexOfVertex(IntegerVector const &v)const;
 
81
  int numberOfConesOfDimension(int d)const;
 
82
  /**
 
83
   * Given a cone this returns its index among all cones of that dimension.
 
84
   * Used for assigning "names" to cones.
 
85
   */
 
86
  int dimensionIndex(Cone const &c);
 
87
  /**
 
88
   * This routine is used for constructing the boundary map for homology computations.
 
89
   */
 
90
  void boundary(Cone const &c, vector<int> &indices, vector<int> &signs);
 
91
/**
 
92
 * This routine computes the ith boundary map for homology as a matrix.
 
93
 */
 
94
  IntegerMatrix boundaryMap(int i);
37
95
};
38
96
 
39
97
#endif