-
Notifications
You must be signed in to change notification settings - Fork 1
/
discretegroup.h
60 lines (45 loc) · 2.25 KB
/
discretegroup.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef DISCRETEGROUP_H
#define DISCRETEGROUP_H
#include "tools.h"
#include "word.h"
#include "topologicalsurface.h"
class DiscreteGroup
{
friend std::ostream & operator<<(std::ostream &out, const DiscreteGroup & Gamma);
public:
DiscreteGroup();
DiscreteGroup(const std::vector<generatorName> &generators, const std::vector<Word> &relations);
explicit DiscreteGroup(const TopologicalSurface &S);
std::vector<generatorName> getGenerators() const;
std::vector<Word> getRelations() const;
std::vector<Word> getCusps() const;
uint numberOfCusps() const;
std::vector<Word> getWordsOfLengthLessThan(uint n) const;
std::vector<Word> getWordsOfLengthEqualTo(uint n) const;
std::vector<Word> getWordsOfNonRepeatingLettersLengthLessThan(uint n) const;
std::vector<Word> getWordsOfNonRepeatingLettersLengthEqualTo(uint n) const;
std::vector<Word> getSidePairings() const;
std::vector<Word> getPairingsFromVertex() const;
std::vector<Word> getPairingsAroundVertex() const;
std::vector<Word> getPairingsAroundVertices() const;
std::string getWordAsString(const Word & w) const;
std::string getLetterAsString(const letter & l) const;
bool isClosedSurfaceGroup() const;
void setPairOfPants(generatorName c1, generatorName c2, generatorName c3);
void rotateGenerators(int rightshift);
static DiscreteGroup amalgamateOverInverse(const DiscreteGroup & Gamma1, const generatorName &a1,
const DiscreteGroup & Gamma2, const generatorName &a1inverse);
static DiscreteGroup HNNextensionOverInverse(const DiscreteGroup & Gamma, const generatorName &a, const generatorName &ainverse,
const generatorName & newGeneratorName);
private:
void reset();
void rotateWord(Word &w, int shift);
static bool checkCompatibilityForAmalgamation(const DiscreteGroup &Gamma1, const DiscreteGroup &Gamma2);
static bool checkCompatibilityforHNNextension(const DiscreteGroup &Gamma);
bool findGeneratorIndex(uint &outputIndex, const generatorName &a) const;
std::vector<generatorName> generators;
std::vector<Word> relations;
std::vector<Word> cusps;
bool closedSurfaceGroup;
};
#endif // DISCRETEGROUP_H