MeVisLab Toolbox Reference
|
A five by five matrix class of five row vectors. More...
#include <mlMatrix5.h>
Public Types | |
typedef DT | ComponentType |
A typedef to "export" the type of components. | |
Public Types inherited from ml::FloatingPointMatrix< Tvec5< DT >, 5 > | |
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 Tvec5< DT > | VectorType |
A typedef to "export" the type of component vector. | |
Public Member Functions | |
Tmat5 () | |
Builds a 5x5 matrix from 25 0 elements. | |
Tmat5 (const DT diagValue) | |
Tmat5 (const Tvec5< DT > &row0, const Tvec5< DT > &row1, const Tvec5< DT > &row2, const Tvec5< DT > &row3, const Tvec5< DT > &row4) | |
Builds a matrix of the five row vectors row0, ..., row4. | |
Tmat5 (const Tmat5< DT > &mat) | |
Copy constructor from the Tmat5 mat. | |
Tmat5 (const float mat[25]) | |
Constructor from 25 floats given as array mat, row by row. | |
Tmat5 (const double mat[25]) | |
Constructor from 25 doubles given as array mat, row by row. | |
Tmat5 (const double in00, const double in01, const double in02, const double in03, const double in04, const double in10, const double in11, const double in12, const double in13, const double in14, const double in20, const double in21, const double in22, const double in23, const double in24, const double in30, const double in31, const double in32, const double in33, const double in34, const double in40, const double in41, const double in42, const double in43, const double in44) | |
Initializes all matrix elements explicitly with scalars, filling it row by row. | |
void | setValues (const float m[25]) |
Copies the contents from float array m into *this. | |
void | getValues (float m[25]) const |
Copies the contents of *this into float array m. | |
void | setValues (const double m[25]) |
Copies the contents of m into *this, where m must provide at least 25 accessible entries, row by row. | |
void | getValues (double m[25]) const |
Copies the contents of *this into m, where m must provide at least 25 accessible entries, row by row. | |
void | setScaleMatrix (const DT scale) |
Sets the diagonal matrix with scale on diagonal. | |
void | set (const DT val) |
Sets all values to val. | |
bool | operator< (const Tmat5< DT > &) const |
Dummy "lesser than operator" which always returns false. | |
const Tmat5< DT > & | operator= (const Tmat5< DT > &m) |
Assigns by a Tmat5. | |
const Tmat5< DT > & | operator+= (const Tmat5< DT > &m) |
Adds component wise by a Tmat5. | |
const Tmat5< DT > & | operator-= (const Tmat5< DT > &m) |
Subtracts component wise by a Tmat5. | |
const Tmat5< DT > & | operator*= (const DT d) |
Multiplies by a constant. | |
const Tmat5< DT > & | operator/= (const DT d) |
Divide by a constant. Division by zero is not handled and must be avoided by caller. | |
Public Member Functions inherited from ml::FloatingPointMatrix< Tvec5< DT >, 5 > | |
const Tvec5< DT > & | operator[] (const size_t i) const |
Tvec5< 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. | |
Static Public Member Functions | |
static Tmat5< DT > | getMat (const double val) |
Returns a matrix filled with values val, row by row. | |
Special Functions | |
DT | determinantLower4 (const int col1, const int col2, const int col3, const int col4) const |
Determines the (sub)determinant of columns given by col1, col2, col3 and col4. | |
DT | det () const |
Returns the determinant of this matrix. | |
Tmat5< DT > | inverse (bool *isInvertible=nullptr) const |
Returns the inverse. | |
Tmat5 | transpose () const |
Returns the transposed of this matrix. | |
const Tmat5< DT > & | apply (MLDblFuncPtr fct) |
Applies the function fct to each component. | |
static Tmat5 | getIdentity () |
Returns the identity matrix. | |
Additional Inherited Members | |
Protected Attributes inherited from ml::FloatingPointMatrix< Tvec5< DT >, 5 > | |
Tvec5< DT > | v [size] |
The rows constituting the matrix. | |
A five by five matrix class of five row vectors.
Definition at line 48 of file mlMatrix5.h.
A typedef to "export" the type of components.
Definition at line 53 of file mlMatrix5.h.
Builds a 5x5 matrix from 25 0 elements.
Definition at line 166 of file mlMatrix5.h.
References mlrange_cast().
Definition at line 173 of file mlMatrix5.h.
References mlrange_cast().
|
inline |
Builds a matrix of the five row vectors row0, ..., row4.
Definition at line 183 of file mlMatrix5.h.
References mlrange_cast().
Copy constructor from the Tmat5 mat.
Definition at line 195 of file mlMatrix5.h.
References mlrange_cast(), and ml::FloatingPointMatrix< VectorT, size >::v.
Constructor from 25 floats given as array mat, row by row.
Definition at line 206 of file mlMatrix5.h.
References mlrange_cast().
Constructor from 25 doubles given as array mat, row by row.
Definition at line 213 of file mlMatrix5.h.
References mlrange_cast().
ml::Tmat5< DT >::Tmat5 | ( | const double | in00, |
const double | in01, | ||
const double | in02, | ||
const double | in03, | ||
const double | in04, | ||
const double | in10, | ||
const double | in11, | ||
const double | in12, | ||
const double | in13, | ||
const double | in14, | ||
const double | in20, | ||
const double | in21, | ||
const double | in22, | ||
const double | in23, | ||
const double | in24, | ||
const double | in30, | ||
const double | in31, | ||
const double | in32, | ||
const double | in33, | ||
const double | in34, | ||
const double | in40, | ||
const double | in41, | ||
const double | in42, | ||
const double | in43, | ||
const double | in44 ) |
Initializes all matrix elements explicitly with scalars, filling it row by row.
Definition at line 366 of file mlMatrix5.h.
References mlrange_cast().
const Tmat5< DT > & ml::Tmat5< DT >::apply | ( | MLDblFuncPtr | fct | ) |
Applies the function fct to each component.
Definition at line 637 of file mlMatrix5.h.
References ml::Tmat5< DT >::apply(), and mlrange_cast().
Referenced by ml::Tmat5< DT >::apply().
Returns the determinant of this matrix.
Definition at line 573 of file mlMatrix5.h.
Referenced by ml::Tmat5< DT >::determinantLower4().
|
inline |
Determines the (sub)determinant of columns given by col1, col2, col3 and col4.
Definition at line 560 of file mlMatrix5.h.
References ml::Tmat5< DT >::det(), and mlrange_cast().
Returns a matrix filled with values val, row by row.
Definition at line 220 of file mlMatrix5.h.
References mlrange_cast().
Copies the contents of *this into m, where m must provide at least 25 accessible entries, row by row.
Definition at line 501 of file mlMatrix5.h.
References mlrange_cast().
Copies the contents of *this into float array m.
Note that range and precision of the float values may not be sufficient for higher precision matrix contents. m must point to an array with at least 25 accessible entries, row by row.
Definition at line 425 of file mlMatrix5.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 592 of file mlMatrix5.h.
References ml::MLInverseMatHelper(), and mlrange_cast().
Multiplies by a constant.
Definition at line 279 of file mlMatrix5.h.
Adds component wise by a Tmat5.
Definition at line 253 of file mlMatrix5.h.
References mlrange_cast(), and ml::FloatingPointMatrix< VectorT, size >::v.
Subtracts component wise by a Tmat5.
Definition at line 266 of file mlMatrix5.h.
References mlrange_cast(), and ml::FloatingPointMatrix< VectorT, size >::v.
Divide by a constant. Division by zero is not handled and must be avoided by caller.
Definition at line 292 of file mlMatrix5.h.
References ML_CHECK_FLOAT_THROW.
Dummy "lesser than operator" which always returns false.
It is needed to make class work with some STL containers on VC7.
Definition at line 111 of file mlMatrix5.h.
Assigns by a Tmat5.
Definition at line 238 of file mlMatrix5.h.
References mlrange_cast(), and ml::FloatingPointMatrix< VectorT, size >::v.
Sets the diagonal matrix with scale on diagonal.
Definition at line 539 of file mlMatrix5.h.
Copies the contents of m into *this, where m must provide at least 25 accessible entries, row by row.
Definition at line 463 of file mlMatrix5.h.
References mlrange_cast().
Copies the contents from float array m into *this.
m must point to an array with at least 25 valid entries, row by row.
Definition at line 385 of file mlMatrix5.h.
References mlrange_cast().
Returns the transposed of this matrix.
Definition at line 611 of file mlMatrix5.h.
References mlrange_cast().
Referenced by ml::operator*().