ML Reference
ml::Tmat6< DT > Class Template Reference

A six by six matrix class of six row vectors. More...

#include <mlMatrix6.h>

Inheritance diagram for ml::Tmat6< DT >:
ml::FloatingPointMatrix< Tvec6< DT >, 6 >

List of all members.

Public Types

typedef DT ComponentType
 A typedef to "export" the type of components.

Public Member Functions

bool operator< (const Tmat6< DT > &) const
 Dummy "lesser than operator" which always returns false.
Tmat6 constructors, set and get functionality.
 Tmat6 (const double in00, const double in01, const double in02, const double in03, const double in04, const double in05, const double in10, const double in11, const double in12, const double in13, const double in14, const double in15, const double in20, const double in21, const double in22, const double in23, const double in24, const double in25, const double in30, const double in31, const double in32, const double in33, const double in34, const double in35, const double in40, const double in41, const double in42, const double in43, const double in44, const double in45, const double in50, const double in51, const double in52, const double in53, const double in54, const double in55)
 Initialize all matrix elements explicitly with scalars, filling it row by row.
void setValues (const float m[36])
 Copy contents from float array m into *this.
void getValues (float m[36]) const
 Copy contents of *this into float array m.
void setValues (const double m[36])
 Copy contents of m into *this, where m must provide at least 36 accessible entries.
void getValues (double m[36]) const
 Copy contents of *this into m, where m must provide at least 36 accessible entries.
void setScaleMatrix (const DT scale)
 Set diagonal matrix with scale on diagonal.

Constructors, set and get functionality.

 Tmat6 ()
 Build 6x6 matrix from 36 0 elements.
 Tmat6 (const DT diagValue)
 Tmat6 (const Tvec6< DT > &row0, const Tvec6< DT > &row1, const Tvec6< DT > &row2, const Tvec6< DT > &row3, const Tvec6< DT > &row4, const Tvec6< DT > &row5)
 Build matrix of the six row vectors row0, ..., row5.
 Tmat6 (const Tmat6< DT > &m)
 Copy constructor from the Tmat6 mat.
 Tmat6 (const float mat[36])
 Constructor from 36 floats given as array mat.
 Tmat6 (const double mat[36])
 Constructor from 36 doubles given as array mat.
void set (const DT val)
 Set all values to val.
const Tmat6< DT > & operator= (const Tmat6< DT > &m)
 Assignment of a Tmat6.
const Tmat6< DT > & operator+= (const Tmat6< DT > &m)
 Component wise addition by a Tmat6.
const Tmat6< DT > & operator-= (const Tmat6< DT > &m)
 Component wise subtraction by a Tmat6.
const Tmat6< DT > & operator*= (const DT d)
 Multiplication by a constant.
const Tmat6< DT > & operator/= (const DT d)
 Division by a constant. Division by zero is not handled and must be avoided by caller.
static Tmat6< DT > getMat (const double val)
 Return a matrix filled with values val.

Special Functions

DT determinantLower5 (const int col1, const int col2, const int col3, const int col4, const int col5) const
 Determine the (sub)determinant of columns given by col1, col2, col3, col4 and col5.
DT det () const
 Determinant.
Tmat6< DT > inverse (bool *isInvertible=NULL) const
 Returns the inverse.
Tmat6 transpose () const
 Transpose.
const Tmat6< DT > & apply (MLDblFuncPtr fct)
 Apply the function fct to each component.
static Tmat6 getIdentity ()
 Return identity matrix.

Detailed Description

template<class DT>
class ml::Tmat6< DT >

A six by six matrix class of six row vectors.

Definition at line 38 of file mlMatrix6.h.


Member Typedef Documentation

template<class DT>
typedef DT ml::Tmat6< DT >::ComponentType

A typedef to "export" the type of components.

Reimplemented from ml::FloatingPointMatrix< Tvec6< DT >, 6 >.

Definition at line 43 of file mlMatrix6.h.


Constructor & Destructor Documentation

template<class DT >
ml::Tmat6< DT >::Tmat6 ( ) [inline]

Build 6x6 matrix from 36 0 elements.

Definition at line 158 of file mlMatrix6.h.

References ML_TRACE_IN_TIME_CRITICAL.

template<class DT>
ml::Tmat6< DT >::Tmat6 ( const DT  diagValue) [inline]

Definition at line 167 of file mlMatrix6.h.

References ML_TRACE_IN_TIME_CRITICAL.

template<class DT>
ml::Tmat6< DT >::Tmat6 ( const Tvec6< DT > &  row0,
const Tvec6< DT > &  row1,
const Tvec6< DT > &  row2,
const Tvec6< DT > &  row3,
const Tvec6< DT > &  row4,
const Tvec6< DT > &  row5 
) [inline]

Build matrix of the six row vectors row0, ..., row5.

Definition at line 178 of file mlMatrix6.h.

References ML_TRACE_IN_TIME_CRITICAL.

template<class DT>
ml::Tmat6< DT >::Tmat6 ( const Tmat6< DT > &  m) [inline]

Copy constructor from the Tmat6 mat.

Definition at line 193 of file mlMatrix6.h.

References ML_TRACE_IN_TIME_CRITICAL, and ml::FloatingPointMatrix< Tvec6< DT >, 6 >::v.

template<class DT>
ml::Tmat6< DT >::Tmat6 ( const float  mat[36]) [inline]

Constructor from 36 floats given as array mat.

Definition at line 207 of file mlMatrix6.h.

References ML_TRACE_IN_TIME_CRITICAL.

template<class DT>
ml::Tmat6< DT >::Tmat6 ( const double  mat[36]) [inline]

Constructor from 36 doubles given as array mat.

Definition at line 216 of file mlMatrix6.h.

References ML_TRACE_IN_TIME_CRITICAL.

template<class DT>
ml::Tmat6< DT >::Tmat6 ( const double  in00,
const double  in01,
const double  in02,
const double  in03,
const double  in04,
const double  in05,
const double  in10,
const double  in11,
const double  in12,
const double  in13,
const double  in14,
const double  in15,
const double  in20,
const double  in21,
const double  in22,
const double  in23,
const double  in24,
const double  in25,
const double  in30,
const double  in31,
const double  in32,
const double  in33,
const double  in34,
const double  in35,
const double  in40,
const double  in41,
const double  in42,
const double  in43,
const double  in44,
const double  in45,
const double  in50,
const double  in51,
const double  in52,
const double  in53,
const double  in54,
const double  in55 
)

Initialize all matrix elements explicitly with scalars, filling it row by row.

Definition at line 411 of file mlMatrix6.h.

References ML_CATCH_RETHROW, ML_TRACE_IN, and ML_TRY.


Member Function Documentation

template<class DT >
const Tmat6< DT > & ml::Tmat6< DT >::apply ( MLDblFuncPtr  fct)

Apply the function fct to each component.

Definition at line 653 of file mlMatrix6.h.

References ML_CATCH_RETHROW, ML_TRACE_IN, and ML_TRY.

template<class DT >
DT ml::Tmat6< DT >::det ( ) const

Determinant.

Definition at line 566 of file mlMatrix6.h.

References ML_CATCH_RETHROW, ML_TRACE_IN, and ML_TRY.

template<class DT >
DT ml::Tmat6< DT >::determinantLower5 ( const int  col1,
const int  col2,
const int  col3,
const int  col4,
const int  col5 
) const

Determine the (sub)determinant of columns given by col1, col2, col3, col4 and col5.

Definition at line 544 of file mlMatrix6.h.

References ML_CATCH_RETHROW, ML_TRACE_IN, and ML_TRY.

template<class DT >
Tmat6< DT > ml::Tmat6< DT >::getIdentity ( ) [static]

Return identity matrix.

Definition at line 637 of file mlMatrix6.h.

References ML_TRACE_IN.

template<class DT >
Tmat6< DT > ml::Tmat6< DT >::getMat ( const double  val) [inline, static]

Return a matrix filled with values val.

Definition at line 225 of file mlMatrix6.h.

References ML_TRACE_IN_TIME_CRITICAL.

template<class DT >
void ml::Tmat6< DT >::getValues ( double  m[36]) const

Copy contents of *this into m, where m must provide at least 36 accessible entries.

Definition at line 499 of file mlMatrix6.h.

References ML_CATCH_RETHROW, ML_TRACE_IN, and ML_TRY.

template<class DT >
void ml::Tmat6< DT >::getValues ( float  m[36]) 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 36 accessible entries.

Definition at line 459 of file mlMatrix6.h.

References ML_CATCH_RETHROW, ML_TRACE_IN, and ML_TRY.

template<class DT >
Tmat6< DT > ml::Tmat6< DT >::inverse ( bool *  isInvertible = NULL) const

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 594 of file mlMatrix6.h.

References ML_CATCH_RETHROW, ML_TRACE_IN, ML_TRY, and ml::MLInverseMatHelper().

template<class DT>
const Tmat6< DT > & ml::Tmat6< DT >::operator*= ( const DT  d) [inline]

Multiplication by a constant.

Definition at line 298 of file mlMatrix6.h.

References ML_TRACE_IN_TIME_CRITICAL.

template<class DT>
const Tmat6< DT > & ml::Tmat6< DT >::operator+= ( const Tmat6< DT > &  m) [inline]

Component wise addition by a Tmat6.

Definition at line 266 of file mlMatrix6.h.

References ML_TRACE_IN_TIME_CRITICAL, and ml::FloatingPointMatrix< Tvec6< DT >, 6 >::v.

template<class DT>
const Tmat6< DT > & ml::Tmat6< DT >::operator-= ( const Tmat6< DT > &  m) [inline]

Component wise subtraction by a Tmat6.

Definition at line 282 of file mlMatrix6.h.

References ML_TRACE_IN_TIME_CRITICAL, and ml::FloatingPointMatrix< Tvec6< DT >, 6 >::v.

template<class DT>
const Tmat6< DT > & ml::Tmat6< DT >::operator/= ( const DT  d) [inline]

Division by a constant. Division by zero is not handled and must be avoided by caller.

Definition at line 314 of file mlMatrix6.h.

References ML_CATCH_RETHROW, ML_CHECK_THROW, ML_TRACE_IN, ML_TRY, and MLValueIs0WOM().

template<class DT>
bool ml::Tmat6< DT >::operator< ( const Tmat6< DT > &  ) const [inline]

Dummy "lesser than operator" which always returns false.

It is needed to make class work with some STL containers on VC7.

Definition at line 102 of file mlMatrix6.h.

template<class DT>
const Tmat6< DT > & ml::Tmat6< DT >::operator= ( const Tmat6< DT > &  m) [inline]

Assignment of a Tmat6.

Definition at line 248 of file mlMatrix6.h.

References ML_TRACE_IN_TIME_CRITICAL, and ml::FloatingPointMatrix< Tvec6< DT >, 6 >::v.

template<class DT>
void ml::Tmat6< DT >::set ( const DT  val) [inline]

Set all values to val.

Definition at line 239 of file mlMatrix6.h.

References ML_TRACE_IN_TIME_CRITICAL.

template<class DT>
void ml::Tmat6< DT >::setScaleMatrix ( const DT  scale)

Set diagonal matrix with scale on diagonal.

Definition at line 519 of file mlMatrix6.h.

References ML_CATCH_RETHROW, ML_TRACE_IN, and ML_TRY.

template<class DT >
void ml::Tmat6< DT >::setValues ( const float  m[36])

Copy contents from float array m into *this.

m must point to an array with at least 36 valid entries.

Definition at line 437 of file mlMatrix6.h.

References ML_CATCH_RETHROW, ML_TRACE_IN, and ML_TRY.

template<class DT >
void ml::Tmat6< DT >::setValues ( const double  m[36])

Copy contents of m into *this, where m must provide at least 36 accessible entries.

Definition at line 479 of file mlMatrix6.h.

References ML_CATCH_RETHROW, ML_TRACE_IN, and ML_TRY.

template<class DT >
Tmat6< DT > ml::Tmat6< DT >::transpose ( ) const

Transpose.

Definition at line 621 of file mlMatrix6.h.

References ML_TRACE_IN.

Referenced by ml::operator*().


The documentation for this class was generated from the following file: