20 #ifndef __mia_3d_matrix_hh
21 #define __mia_3d_matrix_hh
24 #pragma GCC diagnostic push
26 #pragma GCC diagnostic ignored "-Wunused-local-typedefs"
31 #include <Eigen/Eigenvalues>
34 #pragma GCC diagnostic pop
118 void print( std::ostream& os)
const;
164 void evaluate_ev()
const;
166 typedef Eigen::Matrix<T, 3, 3> EMatrix3;
167 typedef Eigen::EigenSolver<EMatrix3> ESolver3;
169 mutable std::unique_ptr<ESolver3> m_esolver;
170 mutable int m_ev_order[3];
173 template <
typename T>
174 template <
typename I>
182 template <
typename T>
188 template <
typename T>
192 m.
x.y * x.
x + m.
y.y * x.
y + m.
z.y * x.
z,
193 m.
x.z * x.
x + m.
y.z * x.
y + m.
z.z * x.
z);
197 template <
typename T>
198 std::ostream& operator << (std::ostream& os, const T3DMatrix<T>& m)
204 template <
typename T>
213 template <
typename T>
217 m.
x.x * x.
x.y + m.
x.y * x.
y.y + m.
x.z * x.
z.y,
218 m.
x.x * x.
x.z + m.
x.y * x.
y.z + m.
x.z * x.
z.z),
220 m.
y.x * x.
x.y + m.
y.y * x.
y.y + m.
y.z * x.
z.y,
221 m.
y.x * x.
x.z + m.
y.y * x.
y.z + m.
y.z * x.
z.z),
223 m.
z.x * x.
x.y + m.
z.y * x.
y.y + m.
z.z * x.
z.y,
224 m.
z.x * x.
x.z + m.
z.y * x.
y.z + m.
z.z * x.
z.z));
234 template <
typename T>
239 template <
typename T>
T3DMatrix< T > & operator-=(const T3DMatrix< T > &other)
T3DMatrix< T > transposed() const
T3DVector< T > z
vector element
static const T3DMatrix _0
The zero matrix.
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
static T3DMatrix< T > diagonal(T value)
T3DMatrix< float > C3DFMatrix
a simple 3x3 matrix with single precision floating point values
T3DMatrix< T > & operator=(const T3DMatrix< T > &o)
T3DMatrix< double > C3DDMatrix
a simple 3x3 matrix with double precision floating point values
int get_eigenvalues(C3DFVector &v) const
T3DVector< T > y
vector element
T3DVector< T > operator*(const T3DMatrix< T > &m, const T3DVector< T > &x)
void print(std::ostream &os) const
C3DFVector get_eigenvector(int i) const
T dot(const T2DVector< T > &a, const T2DVector< T > &b)
T3DVector< T > x
vector element
static const T3DMatrix _1
The unity matrix.
#define NS_MIA_END
conveniance define to end the mia namespace