-
Notifications
You must be signed in to change notification settings - Fork 1
/
sl2rmatrix.h
34 lines (26 loc) · 849 Bytes
/
sl2rmatrix.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
#ifndef SL2RMATRIX_H
#define SL2RMATRIX_H
#include "tools.h"
#include "h2point.h"
#include "sl2cmatrix.h"
#include "h2polygon.h"
class SL2RMatrix
{
friend SL2RMatrix operator *(const SL2RMatrix & A1, const SL2RMatrix & A2);
friend H2Point operator *(const SL2RMatrix & A, const H2Point & p);
friend std::ostream & operator<<(std::ostream & out, const SL2RMatrix & A);
public:
SL2RMatrix();
SL2RMatrix(double a, double b, double c, double d);
SL2RMatrix(uint i);
static bool almostEqual(const SL2RMatrix & A1, const SL2RMatrix & A2);
double det() const;
double error() const;
SL2CMatrix complexCast() const;
void getCoefficients(double &a, double &b, double &c, double &d) const;
void setIdentity();
SL2RMatrix inverse() const;
private:
double a, b, c, d;
};
#endif // SL2RMATRIX_H