ML 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 Member Functions | |
Tmat5 () | |
Build 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) | |
Build 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) | |
Initialize all matrix elements explicitly with scalars, filling it row by row. | |
void | setValues (const float m[25]) |
Copy contents from float array m into *this. | |
void | getValues (float m[25]) const |
Copy contents of *this into float array m. | |
void | setValues (const double m[25]) |
Copy contents of m into *this, where m must provide at least 25 accessible entries, row by row. | |
void | getValues (double m[25]) const |
Copy contents of *this into m, where m must provide at least 25 accessible entries, row by row. | |
void | setScaleMatrix (const DT scale) |
Set diagonal matrix with scale on diagonal. | |
void | set (const DT val) |
Set 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) |
Assignment of a Tmat5. | |
const Tmat5< DT > & | operator+= (const Tmat5< DT > &m) |
Component wise addition by a Tmat5. | |
const Tmat5< DT > & | operator-= (const Tmat5< DT > &m) |
Component wise subtraction by a Tmat5. | |
const Tmat5< DT > & | operator*= (const DT d) |
Multiplication by a constant. | |
const Tmat5< DT > & | operator/= (const DT d) |
Division by a constant. Division by zero is not handled and must be avoided by caller. | |
Static Public Member Functions | |
static Tmat5< DT > | getMat (const double val) |
Return 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 |
Determine the (sub)determinant of columns given by col1, col2, col3 and col4. | |
DT | det () const |
Determinant. | |
Tmat5< DT > | inverse (bool *isInvertible=NULL) const |
Returns the inverse. | |
Tmat5 | transpose () const |
Transpose. | |
const Tmat5< DT > & | apply (MLDblFuncPtr fct) |
Apply the function fct to each component. | |
static Tmat5 | getIdentity () |
Return identity matrix. |
A five by five matrix class of five row vectors.
Definition at line 51 of file mlMatrix5.h.
typedef DT ml::Tmat5< DT >::ComponentType |
A typedef to "export" the type of components.
Reimplemented from ml::FloatingPointMatrix< Tvec5< DT >, 5 >.
Definition at line 56 of file mlMatrix5.h.
Build 5x5 matrix from 25 0 elements.
Definition at line 169 of file mlMatrix5.h.
References ML_TRACE_IN_TIME_CRITICAL.
Definition at line 178 of file mlMatrix5.h.
References ML_TRACE_IN_TIME_CRITICAL.
ml::Tmat5< DT >::Tmat5 | ( | const Tvec5< DT > & | row0, |
const Tvec5< DT > & | row1, | ||
const Tvec5< DT > & | row2, | ||
const Tvec5< DT > & | row3, | ||
const Tvec5< DT > & | row4 | ||
) | [inline] |
Build matrix of the five row vectors row0, ..., row4.
Definition at line 190 of file mlMatrix5.h.
References ML_TRACE_IN_TIME_CRITICAL.
Copy constructor from the Tmat5 mat.
Definition at line 204 of file mlMatrix5.h.
References ML_TRACE_IN_TIME_CRITICAL, and ml::FloatingPointMatrix< Tvec5< DT >, 5 >::v.
Constructor from 25 floats given as array mat, row by row.
Definition at line 217 of file mlMatrix5.h.
References ML_TRACE_IN_TIME_CRITICAL.
Constructor from 25 doubles given as array mat, row by row.
Definition at line 226 of file mlMatrix5.h.
References ML_TRACE_IN_TIME_CRITICAL.
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 | ||
) |
Initialize all matrix elements explicitly with scalars, filling it row by row.
Definition at line 412 of file mlMatrix5.h.
References ML_TRACE_IN.
const Tmat5< DT > & ml::Tmat5< DT >::apply | ( | MLDblFuncPtr | fct | ) |
Apply the function fct to each component.
Definition at line 729 of file mlMatrix5.h.
References ML_CATCH_RETHROW, ML_TRACE_IN, and ML_TRY.
DT ml::Tmat5< DT >::det | ( | ) | const |
Determinant.
Definition at line 645 of file mlMatrix5.h.
References ML_CATCH_RETHROW, ML_TRACE_IN, and ML_TRY.
DT ml::Tmat5< DT >::determinantLower4 | ( | const int | col1, |
const int | col2, | ||
const int | col3, | ||
const int | col4 | ||
) | const [inline] |
Determine the (sub)determinant of columns given by col1, col2, col3 and col4.
Definition at line 630 of file mlMatrix5.h.
References ML_TRACE_IN.
Return identity matrix.
Definition at line 714 of file mlMatrix5.h.
References ML_TRACE_IN_TIME_CRITICAL.
Return a matrix filled with values val, row by row.
Definition at line 235 of file mlMatrix5.h.
References ML_TRACE_IN_TIME_CRITICAL.
void ml::Tmat5< DT >::getValues | ( | double | m[25] | ) | const |
Copy contents of *this into m, where m must provide at least 25 accessible entries, row by row.
Definition at line 564 of file mlMatrix5.h.
References ML_CATCH_RETHROW, ML_TRACE_IN, and ML_TRY.
void ml::Tmat5< DT >::getValues | ( | float | m[25] | ) | const |
Copy 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 478 of file mlMatrix5.h.
References ML_CATCH_RETHROW, ML_TRACE_IN, and ML_TRY.
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 672 of file mlMatrix5.h.
References ML_CATCH_RETHROW, ML_TRACE_IN, ML_TRY, and ml::MLInverseMatHelper().
Multiplication by a constant.
Definition at line 302 of file mlMatrix5.h.
References ML_TRACE_IN_TIME_CRITICAL.
const Tmat5< DT > & ml::Tmat5< DT >::operator+= | ( | const Tmat5< DT > & | m | ) | [inline] |
Component wise addition by a Tmat5.
Definition at line 272 of file mlMatrix5.h.
References ML_TRACE_IN_TIME_CRITICAL, and ml::FloatingPointMatrix< Tvec5< DT >, 5 >::v.
const Tmat5< DT > & ml::Tmat5< DT >::operator-= | ( | const Tmat5< DT > & | m | ) | [inline] |
Component wise subtraction by a Tmat5.
Definition at line 287 of file mlMatrix5.h.
References ML_TRACE_IN_TIME_CRITICAL, and ml::FloatingPointMatrix< Tvec5< DT >, 5 >::v.
Division by a constant. Division by zero is not handled and must be avoided by caller.
Definition at line 317 of file mlMatrix5.h.
References ML_CATCH_RETHROW, ML_CHECK_FLOAT_THROW, ML_TRACE_IN, and ML_TRY.
Dummy "lesser than operator" which always returns false.
It is needed to make class work with some STL containers on VC7.
Definition at line 114 of file mlMatrix5.h.
Assignment of a Tmat5.
Definition at line 255 of file mlMatrix5.h.
References ML_TRACE_IN_TIME_CRITICAL, and ml::FloatingPointMatrix< Tvec5< DT >, 5 >::v.
void ml::Tmat5< DT >::set | ( | const DT | val | ) | [inline] |
Set all values to val.
Definition at line 248 of file mlMatrix5.h.
void ml::Tmat5< DT >::setScaleMatrix | ( | const DT | scale | ) |
Set diagonal matrix with scale on diagonal.
Definition at line 607 of file mlMatrix5.h.
References ML_TRACE_IN.
void ml::Tmat5< DT >::setValues | ( | const float | m[25] | ) |
Copy 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 433 of file mlMatrix5.h.
References ML_CATCH_RETHROW, ML_TRACE_IN, and ML_TRY.
void ml::Tmat5< DT >::setValues | ( | const double | m[25] | ) |
Copy contents of m into *this, where m must provide at least 25 accessible entries, row by row.
Definition at line 521 of file mlMatrix5.h.
References ML_CATCH_RETHROW, ML_TRACE_IN, and ML_TRY.
Transpose.
Definition at line 699 of file mlMatrix5.h.
References ML_TRACE_IN_TIME_CRITICAL.
Referenced by ml::operator*().