42 double x21,
double x22,
double x23,
43 double x31,
double x32,
double x33) {
57 return (
m[0][0] == rhs(0, 0)) && (
m[0][1] == rhs(0, 1)) && (
m[0][2] == rhs(0, 2))
58 && (
m[1][0] == rhs(1, 0)) && (
m[1][1] == rhs(1, 1)) && (
m[1][2] == rhs(1, 2))
59 && (
m[2][0] == rhs(2, 0)) && (
m[2][1] == rhs(2, 1)) && (
m[2][2] == rhs(2, 2));
64 return (
m[0][0] != rhs(0, 0)) || (
m[0][1] != rhs(0, 1)) || (
m[0][2] != rhs(0, 2))
65 || (
m[1][0] != rhs(1, 0)) || (
m[1][1] != rhs(1, 1)) || (
m[1][2] != rhs(1, 2))
66 || (
m[2][0] != rhs(2, 0)) || (
m[2][1] != rhs(2, 1)) || (
m[2][2] != rhs(2, 2));
71 m[0][0] += rhs.
m[0][0];
72 m[0][1] += rhs.
m[0][1];
73 m[0][2] += rhs.
m[0][2];
74 m[1][0] += rhs.
m[1][0];
75 m[1][1] += rhs.
m[1][1];
76 m[1][2] += rhs.
m[1][2];
77 m[2][0] += rhs.
m[2][0];
78 m[2][1] += rhs.
m[2][1];
79 m[2][2] += rhs.
m[2][2];
85 m[0][0] -= rhs.
m[0][0];
86 m[0][1] -= rhs.
m[0][1];
87 m[0][2] -= rhs.
m[0][2];
88 m[1][0] -= rhs.
m[1][0];
89 m[1][1] -= rhs.
m[1][1];
90 m[1][2] -= rhs.
m[1][2];
91 m[2][0] -= rhs.
m[2][0];
92 m[2][1] -= rhs.
m[2][1];
93 m[2][2] -= rhs.
m[2][2];
99 return (*
this = *
this * rhs);
123 return (
m[0][0] == 1.0) && (
m[0][1] == 0.0) && (
m[0][2] == 0.0)
124 && (
m[1][0] == 0.0) && (
m[1][1] == 1.0) && (
m[1][2] == 0.0)
125 && (
m[2][0] == 0.0) && (
m[2][1] == 0.0) && (
m[2][2] == 1.0);
131 m[0][0] * (
m[1][1] *
m[2][2] -
m[1][2] *
m[2][1]) +
132 m[0][1] * (
m[1][2] *
m[2][0] -
m[1][0] *
m[2][2]) +
133 m[0][2] * (
m[1][0] *
m[2][1] -
m[1][1] *
m[2][0]);
136 (
m[2][1] *
m[0][2] -
m[2][2] *
m[0][1]) /
det,
137 (
m[0][1] *
m[1][2] -
m[0][2] *
m[1][1]) /
det,
139 (
m[1][2] *
m[2][0] -
m[1][0] *
m[2][2]) /
det,
140 (
m[2][2] *
m[0][0] -
m[2][0] *
m[0][2]) /
det,
141 (
m[0][2] *
m[1][0] -
m[0][0] *
m[1][2]) /
det,
143 (
m[1][0] *
m[2][1] -
m[1][1] *
m[2][0]) /
det,
144 (
m[2][0] *
m[0][1] -
m[2][1] *
m[0][0]) /
det,
145 (
m[0][0] *
m[1][1] -
m[0][1] *
m[1][0]) /
det);
152 for(
int i = 0; i < 3; i++) {
164 return result += rhs;
170 return result += rhs;
175 return Matrix3D(lhs(0, 0) * rhs(0, 0) + lhs(0, 1) * rhs(1, 0) + lhs(0, 2) * rhs(2, 0),
176 lhs(0, 0) * rhs(0, 1) + lhs(0, 1) * rhs(1, 1) + lhs(0, 2) * rhs(2, 1),
177 lhs(0, 0) * rhs(0, 2) + lhs(0, 1) * rhs(1, 2) + lhs(0, 2) * rhs(2, 2),
179 lhs(1, 0) * rhs(0, 0) + lhs(1, 1) * rhs(1, 0) + lhs(1, 2) * rhs(2, 0),
180 lhs(1, 0) * rhs(0, 1) + lhs(1, 1) * rhs(1, 1) + lhs(1, 2) * rhs(2, 1),
181 lhs(1, 0) * rhs(0, 2) + lhs(1, 1) * rhs(1, 2) + lhs(1, 2) * rhs(2, 2),
183 lhs(2, 0) * rhs(0, 0) + lhs(2, 1) * rhs(1, 0) + lhs(2, 2) * rhs(2, 0),
184 lhs(2, 0) * rhs(0, 1) + lhs(2, 1) * rhs(1, 1) + lhs(2, 2) * rhs(2, 1),
185 lhs(2, 0) * rhs(0, 2) + lhs(2, 1) * rhs(1, 2) + lhs(2, 2) * rhs(2, 2));
190 return Vector3D(lhs(0, 0) * rhs(0) + lhs(0, 1) * rhs(1) + lhs(0, 2) * rhs(2),
191 lhs(1, 0) * rhs(0) + lhs(1, 1) * rhs(1) + lhs(1, 2) * rhs(2),
192 lhs(2, 0) * rhs(0) + lhs(2, 1) * rhs(1) + lhs(2, 2) * rhs(2));
Matrix3D operator*(const Matrix3D &lhs, const Matrix3D &rhs)
Multiply.
Matrix3D operator+(const Matrix3D &lhs, const Matrix3D &rhs)
Add.
Matrix3D operator-(const Matrix3D &lhs, const Matrix3D &rhs)
Subtract.
T det(const AntiSymTenzor< T, 3 > &)
constexpr double c
The velocity of light in m/s.
Matrix3D transpose() const
Transpose.
Matrix3D & operator-=(const Matrix3D &rhs)
Subtract and assign.
Matrix3D & operator+=(const Matrix3D &rhs)
Add and assign.
bool isIdentity() const
Test for identity.
Matrix3D & operator*=(const Matrix3D &rhs)
Multiply and assign.
bool operator!=(const Matrix3D &) const
Matrix3D inverse() const
Inverse.
bool operator==(const Matrix3D &) const
static Matrix3D Identity()
Make identity.
Matrix3D()
Default constructor.