-
Notifications
You must be signed in to change notification settings - Fork 1
/
fenchelnielsenconstructor.h
98 lines (76 loc) · 3.18 KB
/
fenchelnielsenconstructor.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#ifndef FENCHELNIELSENCONSTRUCTOR_H
#define FENCHELNIELSENCONSTRUCTOR_H
#include "tools.h"
#include "grouprepresentation.h"
#include "topologicalsurface.h"
class PantsTree;
class FenchelNielsenConstructor
{
public:
FenchelNielsenConstructor(const std::vector<double> & lengths, const std::vector<double> & twists);
~FenchelNielsenConstructor();
FenchelNielsenConstructor() = delete;
FenchelNielsenConstructor(const FenchelNielsenConstructor &) = delete;
FenchelNielsenConstructor & operator=(FenchelNielsenConstructor) = delete;
GroupRepresentation<H2Isometry> getUnnormalizedRepresentation();
GroupRepresentation<H2Isometry> getRepresentation();
private:
void setNormalizedTwists();
void setNormalizedLengths();
void splitAugmentedLengthsAndTwists();
uint genus, gLeft, gRight;
double firstTwist;
std::vector<double> lengths, cLengths, sLengths, cLengthsLeft, cLengthsRight, sLengthsLeft, sLengthsRight;
std::vector<double> twists, nTwists, nTwistsLeft, nTwistsRight;
PantsTree * LeftTree;
PantsTree * RightTree;
};
class PantsTree
{
friend class PantsTreeNode;
friend class PantsTreeRoot;
friend class FenchelNielsenConstructor;
public:
PantsTree(uint index, const std::vector<double> & CoshHalfLengthsAugmented,
const std::vector<double> &SinhHalfLengthsAugmented, const std::string & genericCurveName);
virtual ~PantsTree() {}
virtual GroupRepresentation<H2Isometry> getRepresentation(H2Isometry &totalConjugator, const std::string & genericCurveName) = 0;
protected:
GroupRepresentation<H2Isometry> rho;
uint index;
double twistCorrection;
private:
PantsTree(); //Dummy constructor
PantsTree(const PantsTree & other); //Copy constructor
};
class PantsTreeNode : public PantsTree
{
public:
PantsTreeNode(uint index, const std::vector<double> & coshHalfLengthsAugmented, const std::vector<double> & sinhHalfLengthsAugmented,
const std::vector<double> & twistsNormalized, const std::string & genericCurveName);
~PantsTreeNode();
GroupRepresentation<H2Isometry> getRepresentation(H2Isometry &totalConjugator, const std::string & genericCurveName);
private:
PantsTree *leftChild;
PantsTree *rightChild;
H2Isometry conjugatorLeft;
H2Isometry conjugatorRight;
PantsTreeNode(); // Dummy constructor
PantsTreeNode(const PantsTreeNode &other); // Copy constructor
PantsTreeNode & operator=(PantsTreeNode other); // Copy-assignment operator
};
class PantsTreeLeaf : public PantsTree
{
public:
PantsTreeLeaf(uint index, const std::vector<double> & coshHalfLengthsAugmented,
const std::vector<double> & sinhHalfLengthsAugmented, const std::vector<double> & twistsNormalized,
const std::string &genericCurveName);
~PantsTreeLeaf();
GroupRepresentation<H2Isometry> getRepresentation(H2Isometry &totalConjugator, const std::string &genericCurveName);
private:
H2Isometry hNNconjugator;
PantsTreeLeaf(); // Dummy constructor
PantsTreeLeaf(const PantsTreeLeaf &other); // Copy constructor
PantsTreeLeaf & operator=(PantsTreeLeaf other); // Copy-assignment operator
};
#endif // FENCHELNIELSENCONSTRUCTOR_H