MeVisLab Toolbox Reference
|
A three by three matrix class of three row vectors. More...
#include <mlMatrix3.h>
Public Types | |
typedef DT | ComponentType |
A typedef to "export" the type of components. | |
Public Types inherited from ml::FloatingPointMatrix< Tvec3< DT >, 3 > | |
enum | |
This enum grants access to the row count during compile time, e.g. More... | |
enum | |
This enum grants access to the row count during compile time, e.g. More... | |
enum | |
This enum grants access to the number of values in the matrix, e.g. More... | |
typedef VectorT::ComponentType | ComponentType |
A typedef to "export" the type of sub-components. | |
typedef Tvec3< DT > | VectorType |
A typedef to "export" the type of component vector. | |
Public Member Functions | |
bool | operator< (const Tmat3< DT > &) const |
Dummy "lesser than operator" which always returns false. | |
Tmat3 Constructor, set and get functionality. | |
Tmat3 (const double in00, const double in01, const double in02, const double in10, const double in11, const double in12, const double in20, const double in21, const double in22) | |
Initializes all matrix elements explicitly with scalars, filling it row by row. | |
void | setValues (const float mat[9]) |
Copies the contents of mat into *this, row by row. | |
void | getValues (float mat[9]) const |
Copies the contents of *this into mat, row by row. | |
void | setValues (const double mat[9]) |
Copies the contents of mat into *this, row by row. | |
void | getValues (double mat[9]) const |
Copies the contents of *this into mat, row by row. | |
void | setScaleMatrix (const DT scale) |
Sets a diagonal matrix with scale on diagonal. | |
Public Member Functions inherited from ml::FloatingPointMatrix< Tvec3< DT >, 3 > | |
const Tvec3< DT > & | operator[] (const size_t i) const |
Tvec3< DT > & | operator[] (const size_t i) |
ComponentType & | linearIndexed (const size_t idx) |
ComponentType | linearIndexedConst (const size_t idx) const |
ComponentType | compAbsSum () const |
void | setValuesFromPtr (const ComponentType *const values) |
Copies contents from array mat into *this, row by row; type and size must match. | |
void | getValuesToPtr (ComponentType *values) const |
Copies contents of *this into array mat, row by row; type and size must match. | |
Constructors, set and get functionality. | |
Tmat3 () | |
Builds a 3x3 matrix from 9 0 elements. | |
Tmat3 (const DT diagValue) | |
Tmat3 (const Tvec3< DT > &row0, const Tvec3< DT > &row1, const Tvec3< DT > &row2) | |
Builds a matrix of the three row vectors row0, row1, row2. | |
Tmat3 (const Tmat3< DT > &mat) | |
Copy constructor from the Tmat3 mat. | |
Tmat3 (const float mat[9]) | |
Constructor from 9 floating point values in an array given by mat, row by row. | |
Tmat3 (const double mat[9]) | |
Constructor from 9 double values in an array given by mat, row by row. | |
void | set (DT val) |
Sets all values to val. | |
const Tmat3< DT > & | operator= (const Tmat3< DT > &m) |
Assigns by a Tmat3. | |
const Tmat3< DT > & | operator+= (const Tmat3< DT > &m) |
Increments by a Tmat3. | |
const Tmat3< DT > & | operator-= (const Tmat3< DT > &m) |
Decrements by a Tmat3. | |
const Tmat3< DT > & | operator*= (const DT d) |
Multiplies by a constant. | |
const Tmat3< DT > & | operator/= (const DT d) |
Divides by a constant. Division by zero is not handled and must be avoided by caller. | |
static Tmat3< DT > | getMat (const double val) |
Returns a matrix filled with values val. | |
Special Functions | |
DT | det () const |
Determinant. | |
Tmat3 | transpose () const |
Returns the transpose of this matrix. | |
Tmat3 | inverse (bool *isInvertible=nullptr) const |
Returns the inverse. | |
const Tmat3< DT > & | apply (MLDblFuncPtr fct) |
Applies the function fct to each component. | |
Tmat3 | jacobi (Tvec3< DT > &eVal, int &rots) const |
Calculates the Jacobi-Decomposition of 3x3 matrix. | |
static Tmat3 | getIdentity () |
Returns the identity matrix. | |
Additional Inherited Members | |
Protected Attributes inherited from ml::FloatingPointMatrix< Tvec3< DT >, 3 > | |
Tvec3< DT > | v [size] |
The rows constituting the matrix. | |
A three by three matrix class of three row vectors.
Definition at line 36 of file mlMatrix3.h.
A typedef to "export" the type of components.
Definition at line 42 of file mlMatrix3.h.
Builds a 3x3 matrix from 9 0 elements.
Definition at line 148 of file mlMatrix3.h.
References mlrange_cast().
Definition at line 155 of file mlMatrix3.h.
References mlrange_cast().
|
inline |
Builds a matrix of the three row vectors row0, row1, row2.
Definition at line 164 of file mlMatrix3.h.
References mlrange_cast().
Copy constructor from the Tmat3 mat.
Definition at line 173 of file mlMatrix3.h.
References mlrange_cast(), and ml::FloatingPointMatrix< VectorT, size >::v.
Constructor from 9 floating point values in an array given by mat, row by row.
Definition at line 182 of file mlMatrix3.h.
References mlrange_cast().
Constructor from 9 double values in an array given by mat, row by row.
Definition at line 189 of file mlMatrix3.h.
References mlrange_cast().
|
inline |
Initializes all matrix elements explicitly with scalars, filling it row by row.
Definition at line 331 of file mlMatrix3.h.
References mlrange_cast().
|
inline |
Applies the function fct to each component.
Definition at line 448 of file mlMatrix3.h.
References ml::Tmat3< DT >::apply(), and mlrange_cast().
Referenced by ml::Tmat3< DT >::apply().
Returns a matrix filled with values val.
Definition at line 196 of file mlMatrix3.h.
References mlrange_cast().
Copies the contents of *this into mat, row by row.
Note that range and precision of the float values may not be sufficient for the double matrix contents.
Definition at line 382 of file mlMatrix3.h.
References mlrange_cast().
Copies the contents of *this into mat, row by row.
Note that range and precision of the float values may not be sufficient for the double matrix contents.
Definition at line 358 of file mlMatrix3.h.
References mlrange_cast().
Returns the inverse.
Gauss-Jordan elimination with partial pivoting. If a non-NULL Boolean pointer is passed to isInvertible then true is returned in *isInvertible in the case of a successful inversion or false if the inversion is not possible (function return is the identity then). If a NULL pointer is passed as isInvertible the matrix must be invertible, otherwise errors will occur.
Definition at line 685 of file mlMatrix3.h.
References ml::MLInverseMatHelper(), and mlrange_cast().
Calculates the Jacobi-Decomposition of 3x3 matrix.
The Jacobi method is deemed to be an absolutely foolproof method for all real symmetric matrices (however a little bit slower than more sophisticated methods as QR decomposition)
Computes all eigenvalues and eigen vectors of a symmetric 3x3 matrix and returns matrix of normalized eigenvectors. evalues[1,..,3] contains the eigenvalues, rots the number of Jacobi rotations that where required.
evalues[i] <-> (eVec[0][i],eVec[1][i],eVec[2][i])
Definition at line 562 of file mlMatrix3.h.
References mlrange_cast(), and ml::FloatingPointMatrix< VectorT, size >::v.
Multiplies by a constant.
Definition at line 247 of file mlMatrix3.h.
Increments by a Tmat3.
Definition at line 225 of file mlMatrix3.h.
References mlrange_cast(), and ml::FloatingPointMatrix< VectorT, size >::v.
Decrements by a Tmat3.
Definition at line 236 of file mlMatrix3.h.
References mlrange_cast(), and ml::FloatingPointMatrix< VectorT, size >::v.
Divides by a constant. Division by zero is not handled and must be avoided by caller.
Definition at line 258 of file mlMatrix3.h.
Dummy "lesser than operator" which always returns false.
It is needed to make class work with some STL containers on VC7.
Definition at line 93 of file mlMatrix3.h.
Assigns by a Tmat3.
Definition at line 212 of file mlMatrix3.h.
References mlrange_cast(), and ml::FloatingPointMatrix< VectorT, size >::v.
Sets a diagonal matrix with scale on diagonal.
Definition at line 394 of file mlMatrix3.h.
Copies the contents of mat into *this, row by row.
Definition at line 369 of file mlMatrix3.h.
References mlrange_cast().
Copies the contents of mat into *this, row by row.
Definition at line 345 of file mlMatrix3.h.
References mlrange_cast().
Returns the transpose of this matrix.
Definition at line 426 of file mlMatrix3.h.
References mlrange_cast().
Referenced by ml::operator*().