|
MeVisLab Toolbox Reference
|
A 3x3 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., it can be used as a template argument. More... | |
| enum | |
| This enum grants access to the row count during compile time, e.g., it can be used as a template argument. More... | |
| enum | |
| This enum grants access to the number of values in the matrix, e.g., it can be used as a template argument. More... | |
| typedef VectorT::ComponentType | ComponentType |
| A typedef to 'export' the type of subcomponents. | |
| 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' that 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 from float array mat into *this, row by row. | |
| void | getValues (float mat[9]) const |
Copies the contents of *this into float array mat, row by row. | |
| void | setValues (const double mat[9]) |
Copies the contents from double array mat into *this, row by row. | |
| void | getValues (double mat[9]) const |
Copies the contents of *this into double array mat, row by row. | |
| void | setScaleMatrix (const DT scale) |
Sets the diagonal matrix with scale on the 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 the contents from an array matrix into *this, row by row; type and size must match. | |
| void | getValuesToPtr (ComponentType *values) const |
| Copies contents of *this into an array matrix, row by row; type and size must match. | |
Constructors, set and get functionality. | |
| Tmat3 () | |
| Builds a 3x3 matrix from nine zero elements. | |
| Tmat3 (const DT diagValue) | |
Builds a matrix that has the argument diagValue as the diagonal values, zero otherwise. | |
| 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 nine floating point values in an array given by mat, row by row. | |
| Tmat3 (const double mat[9]) | |
Constructor from nine 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 from 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 scalar constant d. | |
| const Tmat3< DT > & | operator/= (const DT d) |
| Divides by a scalar constant. | |
| static Tmat3< DT > | getMat (const double val) |
Returns a matrix filled with values val. | |
Special Functions | |
| DT | det () const |
| Returns the determinant of this matrix. | |
| 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 3x3 matrix class of three row vectors.
Definition at line 35 of file mlMatrix3.h.
A typedef to 'export' the type of components.
Definition at line 40 of file mlMatrix3.h.
Builds a 3x3 matrix from nine zero elements.
Builds a 3x3 matrix from nine 0 elements.
Definition at line 146 of file mlMatrix3.h.
References mlrange_cast().
Builds a matrix that has the argument diagValue as the diagonal values, zero otherwise.
Constructs a matrix that has the argument diagValue as the diagonal values, zero otherwise.
Definition at line 152 of file mlMatrix3.h.
References mlrange_cast().
|
inline |
Builds a matrix of the three row vectors row0, row1, row2.
Builds a matrix of the three row vectors row0, row1, row2.
Definition at line 160 of file mlMatrix3.h.
References mlrange_cast().
Copy constructor from the Tmat3 mat.
Copy constructor from the Tmat3 mat.
Definition at line 168 of file mlMatrix3.h.
References mlrange_cast(), and ml::FloatingPointMatrix< VectorT, size >::v.
Constructor from nine floating point values in an array given by mat, row by row.
Definition at line 176 of file mlMatrix3.h.
References mlrange_cast().
Constructor from nine double values in an array given by mat, row by row.
Definition at line 182 of file mlMatrix3.h.
References mlrange_cast().
|
inline |
Initializes all matrix elements explicitly with scalars, filling it row by row.
Definition at line 308 of file mlMatrix3.h.
References mlrange_cast().
|
inline |
Applies the function fct to each component.
Definition at line 449 of file mlMatrix3.h.
References ml::Tmat3< DT >::apply(), and mlrange_cast().
Referenced by ml::Tmat3< DT >::apply().
Returns the determinant of this matrix.
Determinant.
Definition at line 421 of file mlMatrix3.h.
References DET3.
Returns a matrix filled with values val.
Definition at line 188 of file mlMatrix3.h.
References mlrange_cast().
Copies the contents of *this into double array mat, row by row.
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 379 of file mlMatrix3.h.
References mlrange_cast().
Copies the contents of *this into float array mat, row by row.
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 345 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 returns the identity then). If a NULL pointer is passed as isInvertible, the matrix must be invertible; otherwise, errors will occur.
Definition at line 669 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, it is 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 were required.
evalues[i] <-> (eVec[0][i],eVec[1][i],eVec[2][i])
Definition at line 546 of file mlMatrix3.h.
References mlrange_cast(), sqrt(), and ml::FloatingPointMatrix< VectorT, size >::v.
Multiplies by a scalar constant d.
Multiplies by a constant d.
Definition at line 232 of file mlMatrix3.h.
Increments by a Tmat3.
Definition at line 212 of file mlMatrix3.h.
References mlrange_cast(), and ml::FloatingPointMatrix< VectorT, size >::v.
Decrements by a Tmat3.
Definition at line 222 of file mlMatrix3.h.
References mlrange_cast(), and ml::FloatingPointMatrix< VectorT, size >::v.
Divides by a scalar constant.
Divides by a constant d. Division by zero is not handled and must be avoided by caller.
Division by zero is not handled and must be avoided by caller.
Definition at line 242 of file mlMatrix3.h.
Dummy 'lesser than operator' that always returns false.
It is needed to make class work with some STL containers on VC7.
Definition at line 90 of file mlMatrix3.h.
Assigns from a Tmat3.
Assigns by a Tmat3.
Definition at line 200 of file mlMatrix3.h.
References mlrange_cast(), and ml::FloatingPointMatrix< VectorT, size >::v.
Sets the diagonal matrix with scale on the diagonal.
Sets a diagonal matrix with scale on the diagonal.
Definition at line 396 of file mlMatrix3.h.
Copies the contents from double array mat into *this, row by row.
Copies the contents of mat into *this, row by row.
Definition at line 361 of file mlMatrix3.h.
References mlrange_cast().
Copies the contents from float array mat into *this, row by row.
Copies the contents of mat into *this, row by row.
Definition at line 327 of file mlMatrix3.h.
References mlrange_cast().
Returns the transpose of this matrix.
Definition at line 431 of file mlMatrix3.h.
References mlrange_cast().
Referenced by ml::operator*().