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. 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 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. More... | |
typedef Tvec3< DT > | VectorType |
A typedef to 'export' the type of component vector. More... | |
Public Member Functions | |
bool | operator< (const Tmat3< DT > &) const |
Dummy 'lesser than operator' that always returns false . More... | |
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. More... | |
void | setValues (const float mat[9]) |
Copies the contents from float array mat into *this, row by row. More... | |
void | getValues (float mat[9]) const |
Copies the contents of *this into float array mat , row by row. More... | |
void | setValues (const double mat[9]) |
Copies the contents from double array mat into *this, row by row. More... | |
void | getValues (double mat[9]) const |
Copies the contents of *this into double array mat , row by row. More... | |
void | setScaleMatrix (const DT scale) |
Sets the diagonal matrix with scale on the diagonal. More... | |
![]() | |
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. More... | |
void | getValuesToPtr (ComponentType *values) const |
Copies contents of *this into an array matrix, row by row; type and size must match. More... | |
Constructors, set and get functionality. | |
Tmat3 () | |
Builds a 3x3 matrix from nine zero elements. More... | |
Tmat3 (const DT diagValue) | |
Builds a matrix that has the argument diagValue as the diagonal values, zero otherwise. More... | |
Tmat3 (const Tvec3< DT > &row0, const Tvec3< DT > &row1, const Tvec3< DT > &row2) | |
Builds a matrix of the three row vectors row0, row1, row2. More... | |
Tmat3 (const Tmat3< DT > &mat) | |
Copy constructor from the Tmat3 mat. More... | |
Tmat3 (const float mat[9]) | |
Constructor from nine floating point values in an array given by mat , row by row. More... | |
Tmat3 (const double mat[9]) | |
Constructor from nine double values in an array given by mat , row by row. More... | |
void | set (DT val) |
Sets all values to val . More... | |
const Tmat3< DT > & | operator= (const Tmat3< DT > &m) |
Assigns from a Tmat3. More... | |
const Tmat3< DT > & | operator+= (const Tmat3< DT > &m) |
Increments by a Tmat3. More... | |
const Tmat3< DT > & | operator-= (const Tmat3< DT > &m) |
Decrements by a Tmat3. More... | |
const Tmat3< DT > & | operator*= (const DT d) |
Multiplies by a scalar constant d . More... | |
const Tmat3< DT > & | operator/= (const DT d) |
Divides by a scalar constant. More... | |
static Tmat3< DT > | getMat (const double val) |
Returns a matrix filled with values val . More... | |
Special Functions | |
DT | det () const |
Returns the determinant of this matrix. More... | |
Tmat3 | transpose () const |
Returns the transpose of this matrix. More... | |
Tmat3 | inverse (bool *isInvertible=nullptr) const |
Returns the inverse. More... | |
const Tmat3< DT > & | apply (MLDblFuncPtr fct) |
Applies the function fct to each component. More... | |
Tmat3 | jacobi (Tvec3< DT > &eVal, int &rots) const |
Calculates the Jacobi-decomposition of 3x3 matrix. More... | |
static Tmat3 | getIdentity () |
Returns the identity matrix. More... | |
Additional Inherited Members | |
![]() | |
Tvec3< DT > | v [size] |
The rows constituting the matrix. More... | |
A 3x3 matrix class of three row vectors.
Definition at line 36 of file mlMatrix3.h.
typedef DT ml::Tmat3< DT >::ComponentType |
A typedef to 'export' the type of components.
Definition at line 42 of file mlMatrix3.h.
Builds a 3x3 matrix from nine zero elements.
Builds a 3x3 matrix from nine 0 elements.
Definition at line 148 of file mlMatrix3.h.
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 155 of file mlMatrix3.h.
|
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 164 of file mlMatrix3.h.
Copy constructor from the Tmat3 mat.
Copy constructor from the Tmat3 mat
.
Definition at line 173 of file mlMatrix3.h.
References ml::FloatingPointMatrix< VectorT, size >::v.
Constructor from nine floating point values in an array given by mat
, row by row.
Definition at line 182 of file mlMatrix3.h.
Constructor from nine double values in an array given by mat
, row by row.
Definition at line 189 of file mlMatrix3.h.
|
inline |
Initializes all matrix elements explicitly with scalars, filling it row by row.
Definition at line 331 of file mlMatrix3.h.
References DCMTree::DT.
|
inline |
Applies the function fct
to each component.
Definition at line 448 of file mlMatrix3.h.
DT ml::Tmat3< DT >::det |
Returns the determinant of this matrix.
Determinant.
Definition at line 414 of file mlMatrix3.h.
References DET3.
Returns the identity matrix.
Definition at line 437 of file mlMatrix3.h.
Returns a matrix filled with values val
.
Definition at line 196 of file mlMatrix3.h.
|
inline |
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 382 of file mlMatrix3.h.
|
inline |
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 358 of file mlMatrix3.h.
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 685 of file mlMatrix3.h.
References DCMTree::DT, and ml::MLInverseMatHelper().
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 562 of file mlMatrix3.h.
References ml::abs(), DCMTree::DT, and ml::FloatingPointMatrix< VectorT, size >::v.
Multiplies by a scalar constant d
.
Multiplies by a constant d
.
Definition at line 247 of file mlMatrix3.h.
Increments by a Tmat3.
Definition at line 225 of file mlMatrix3.h.
References ml::FloatingPointMatrix< VectorT, size >::v.
Decrements by a Tmat3.
Definition at line 236 of file mlMatrix3.h.
References 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 258 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 93 of file mlMatrix3.h.
Assigns from a Tmat3.
Assigns by a Tmat3.
Definition at line 212 of file mlMatrix3.h.
References ml::FloatingPointMatrix< VectorT, size >::v.
|
inline |
Sets all values to val
.
Definition at line 205 of file mlMatrix3.h.
|
inline |
Sets the diagonal matrix with scale
on the diagonal.
Sets a diagonal matrix with scale
on the diagonal.
Definition at line 394 of file mlMatrix3.h.
|
inline |
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 369 of file mlMatrix3.h.
References DCMTree::DT.
|
inline |
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 345 of file mlMatrix3.h.
References DCMTree::DT.
Returns the transpose of this matrix.
Definition at line 426 of file mlMatrix3.h.
Referenced by ml::operator*().