1
#ifndef TRIANGULATION_H_INCLUDED
2
#define TRIANGULATION_H_INCLUDED
12
This class represents an oriented simplex. The simplex is stored
13
as the list of indices of the vertices it contains together with
14
an orientation flag which is either +1 or -1. The ordering of the
15
indices is important. The list of indices can be sorted by
16
calling coneSort(). This will change the orientation flag
19
class Cone : public list<int>
29
The class Cone2 is just a short name for a list of integers.
31
typedef list<int> Cone2;
33
static int coneDim(Cone2 const &c, IntegerMatrix const &rays);
34
static IntegerVectorList coneToVectorList(Cone2 const &c, IntegerMatrix const &rays);
35
static void coneSort(Cone &c);
36
static Cone firstSimplex(Cone const &c, IntegerMatrix const &rays);
37
static IntegerVectorList coneComplement(Cone c, IntegerMatrix const &rays);//returns generators of orth. complement.
38
static int signVisible(int v, Cone const &c, IntegerVectorList const &complement, IntegerMatrix const &rays);
39
static list<Cone> triangulateRek(int d, Cone2 const &c, IntegerMatrix const &rays, bool revlex=false, bool ignoreContainedRays=false);
43
Computes a triangulation of the rows of the matrix rays indexed
44
by c. The tringulation is lexicographic unless revlex is set in
45
which case a reverse lexicographic triangulation is
46
computed. Notice that a reverselex triangulation does not always
48
CHOOSING REVLEX DOES NOT WORK YET.
50
static list<Cone> triangulate(Cone2 c, IntegerMatrix const &rays, bool revlex=false); //computes a lexicographic triangulation
51
static list<Cone> triangulate(IntegerMatrix const &rays, bool revlex=false); //computes a lexicographic triangulation
52
static list<Cone> boundary(list<Cone> cones);
53
static IntegerVectorList normals(IntegerMatrix &rays);
55
Takes a Cone list and turns it into a vector of lists of integers, thereby remove the orientation flag stored in the Cones.
57
static vector<list<int> > removeOrientation(list<Cone> const &triangulation);
59
Takes a Cone vector and turns it into a vector of lists of integers, thereby remove the orientation flag stored in the Cones.
61
static vector<list<int> > removeOrientation(vector<Cone> const &triangulation);