-
Notifications
You must be signed in to change notification settings - Fork 0
/
MatB4.h
98 lines (74 loc) · 2.43 KB
/
MatB4.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 MatB4_H
#define MatB4_H
#include <string>
#include <vector>
#include "B4.h"
#include "LRL_MatrixBase.h"
//#include "LRL_Cell.h"
//#include "MatG6.h"
#include "MatN.h"
//#include "MatMN.h"
//#include "VecN.h"
//#include "D7.h"
class LRL_Cell;
class S6;
class D7;
class G6;
class B4;
MatB4 operator* (const double d, const MatB4& m);
MatB4 operator/ (const double d, const MatB4& m);
class MatB4 : public LRL_MatrixBase<B4, MatB4> {
public:
MatB4(void);
MatB4(const MatG6& m);
MatB4(const MatS6& m);
MatB4(const MatD7& m);
MatB4(const MatB4& m);
MatB4(const MatN& m);
//MatB4(const MatMN& m);
MatB4(const std::string& s);
MatB4(const std::vector<double>& v);
MatB4& operator= (const MatB4& v);
MatB4& operator= (const MatS6& v);
MatB4& operator= (const MatD7& v);
MatB4& operator= (const MatG6& v);
MatB4& operator+= (const MatB4& d);
MatB4& operator-= (const MatB4& d);
MatB4& operator*= (const double d);
MatB4& operator/= (const double d);
bool operator== (const MatB4& m) const;
bool operator!= (const MatB4& m) const;
MatB4 operator+ (const MatB4& v) const;
MatB4 operator- (const MatB4& v) const;
MatB4 operator- (void) const; // unary
MatB4 operator* (const MatB4& m2) const;
MatB4 operator* (const double d) const;
MatB4 operator/ (const double d) const;
B4 operator* (const B4& v) const;
double operator[] (const size_t n) const;
double& operator[] (const size_t n);
double DistanceBetween(const MatB4& v1, const MatB4& v2);
size_t size(void) const;
double norm() const;
double norm(const MatB4& t) const;
double Norm() const;
double Norm(const MatB4& t) const;
size_t GetRowDim(void) const { return 4; }
virtual bool IsUnit() const;
static MatB4 Eye(void);
static MatB4 Zero(void);
std::vector<double> GetVector(void) const { return m_mat.GetVector(); }
MatB4 transpose(const MatB4& m) const;
void transpose(void);
double at(const size_t n) const;
MatB4 unit(void);
static MatB4 unit(const MatB4& m);
std::vector<double> GetVector(void) { return m_mat.GetMatrix(); }
void SetVector(const std::vector<double>& v) { m_mat.SetVector(v); }
static MatB4 GetReflection(const size_t n);
static std::vector<MatB4> GetReflections();
private:
MatN m_mat;
static std::vector<MatB4> vB4_Refl;
};
#endif // MatB4_H