-
Notifications
You must be signed in to change notification settings - Fork 1
/
h2isometry.h
81 lines (61 loc) · 2.84 KB
/
h2isometry.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
#ifndef H2ISOMETRY_H
#define H2ISOMETRY_H
#include "tools.h"
#include "sl2cmatrix.h"
#include "h2point.h"
#include "h2geodesic.h"
#include "h2polygon.h"
class H2Isometry
{
friend H2Isometry operator *(const H2Isometry & f1, const H2Isometry & f2);
friend H2Point operator *(const H2Isometry & f, const H2Point & p);
friend H2Point operator *(const H2Point & p, const H2Isometry & f);
friend H2Polygon operator *(const H2Isometry &f, const H2Polygon &P);
friend H2Geodesic operator *(const H2Isometry & f, const H2Geodesic & L);
friend H2GeodesicArc operator *(const H2Isometry & f, const H2GeodesicArc & L);
friend bool almostEqual(const H2Isometry & f1, const H2Isometry & f2);
friend std::ostream & operator<<(std::ostream & out, const H2Isometry &f);
friend class FenchelNielsenConstructor;
friend class PantsTree;
friend class PantsTreeNode;
public:
H2Isometry();
H2Isometry(uint i);
H2Isometry(const SL2RMatrix &A);
static bool almostEqual(const H2Isometry & f1, const H2Isometry & f2);
void getDiskCoordinates(Complex &u, Complex &a) const;
SL2CMatrix getSU11Matrix() const;
SL2RMatrix getSL2RMatrix() const;
void setIdentity();
void setSU11Matrix(const SL2CMatrix & A);
void setSL2Rmatrix(const SL2RMatrix & A);
void setDiskCoordinates(const Complex & u, const Complex & a);
void setByNormalizingPairOnLeftHandSide(const H2Isometry &f1, const H2Isometry &f1left);
void setByNormalizingPairOnRightHandSide(const H2Isometry &f1, const H2Isometry &f1left);
bool isHyperbolic() const;
bool isElliptic() const;
bool isParabolic() const;
bool axis(H2Geodesic &L) const;
Complex hitComplexInDiskModel(const Complex & z);
H2Isometry inverse() const;
double traceSquared() const;
double translationLength() const;
double error() const;
static H2Isometry findConjugatorForGluing(const H2Isometry & f1, const H2Isometry & f1left,
const H2Isometry & f2, const H2Isometry &f2left, double twistNormalized);
void setByMappingPointToOrigin(const H2Point & p);
void setTranslationAxisAndLength(const H2Geodesic & axis, double length);
void setByMappingPointInDiskModelNormalized(const Complex & zIn, const Complex & zOut);
void setByMappingGeodesic(const H2Geodesic & L1, const H2Geodesic & L2);
private:
Complex u,a;
void setTranslationLengthNormalized(double length);
void setVerticalTranslation(double t);
void setVerticalTranslation(double t1, double t2);
void setVerticalTranslation(double t1, double t2, double t3);
void setByMappingToVerticalUp(const H2Geodesic & L);
void setByMappingToVerticalDown(const H2Geodesic & L);
void fixedPointsInDiskModel(CP1Point &c1, CP1Point &c2) const;
static double geodesicNormalizer(const H2Geodesic & L);
};
#endif // H2ISOMETRY_H