MeVisLab Toolbox Reference
ml::Tmat6< DT > Class Template Reference

A 6x6 matrix class of six row vectors. More...

#include <mlMatrix6.h>

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

Public Types

typedef DT ComponentType
 A typedef to 'export' the type of components.
Public Types inherited from ml::FloatingPointMatrix< Tvec6< DT >, 6 >
enum  
enum  
enum  
typedef Tvec6< DT >::ComponentType ComponentType
 A typedef to 'export' the type of subcomponents.
typedef Tvec6< DT > VectorType
 A typedef to 'export' the type of component vector.

Public Member Functions

bool operator< (const Tmat6< DT > &) const
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)
void setValues (const float m[36])
void getValues (float m[36]) const
void setValues (const double m[36])
void getValues (double m[36]) const
void setScaleMatrix (const DT scale)
 Sets the diagonal matrix with scale on the diagonal.
Public Member Functions inherited from ml::FloatingPointMatrix< Tvec6< DT >, 6 >
const Tvec6< DT > & operator[] (const size_t i) const
ComponentTypelinearIndexed (const size_t idx)
ComponentType linearIndexedConst (const size_t idx) const
ComponentType compAbsSum () const
void setValuesFromPtr (const ComponentType *const values)
void getValuesToPtr (ComponentType *values) const

Constructors, set and get functionality.

 Tmat6 ()
 Builds a 6x6 matrix from 36 zero elements.
 Tmat6 (const DT diagValue)
 Builds a matrix that has the argument diagValue as the diagonal values, zero otherwise.
 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)
 Builds a 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, read row by row.
 Tmat6 (const double mat[36])
 Constructor from 36 doubles given as array mat, read row by row.
void set (const DT val)
 Sets all values to val.
const Tmat6< DT > & operator= (const Tmat6< DT > &m)
 Assigns from a Tmat6.
const Tmat6< DT > & operator+= (const Tmat6< DT > &m)
 Adds component-wise with a Tmat6.
const Tmat6< DT > & operator-= (const Tmat6< DT > &m)
 Subtracts component-wise by a Tmat6.
const Tmat6< DT > & operator*= (const DT d)
 Multiplies by a scalar constant d.
const Tmat6< DT > & operator/= (const DT d)
 Divides by a constant d. Division by zero is not handled and must be avoided by caller.
static Tmat6< DT > getMat (const double val)
 Returns 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
 Determines the (sub)determinant of columns given by col1, col2, col3, col4, and col5.
DT det () const
 Returns the determinant of this matrix.
Tmat6< DT > inverse (bool *isInvertible=nullptr) const
Tmat6 transpose () const
 Returns the transposed of this matrix.
const Tmat6< DT > & apply (MLDblFuncPtr fct)
 Applies the function fct to each component.
static Tmat6 getIdentity ()
 Returns the identity matrix.

Additional Inherited Members

Protected Attributes inherited from ml::FloatingPointMatrix< Tvec6< DT >, 6 >
Tvec6< DT > v [size]
 The rows constituting the matrix.

Detailed Description

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

A 6x6 matrix class of six row vectors.

Definition at line 36 of file mlMatrix6.h.

Member Typedef Documentation

◆ ComponentType

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

A typedef to 'export' the type of components.

Definition at line 41 of file mlMatrix6.h.

Constructor & Destructor Documentation

◆ Tmat6() [1/7]

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

Builds a 6x6 matrix from 36 zero elements.

Builds a 6x6 matrix from 36 0 elements.

Definition at line 156 of file mlMatrix6.h.

References Tmat6(), and ml::FloatingPointMatrix< Tvec6< DT >, 6 >::v.

Referenced by apply(), getIdentity(), getMat(), inverse(), operator*=(), operator+=(), operator-=(), operator/=(), operator=(), Tmat6(), Tmat6(), Tmat6(), Tmat6(), Tmat6(), Tmat6(), Tmat6(), and transpose().

◆ Tmat6() [2/7]

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

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

References Tmat6(), and ml::FloatingPointMatrix< Tvec6< DT >, 6 >::v.

◆ Tmat6() [3/7]

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

Builds a matrix of the six row vectors row0, ..., row5.

Definition at line 172 of file mlMatrix6.h.

References Tmat6(), and ml::FloatingPointMatrix< Tvec6< DT >, 6 >::v.

◆ Tmat6() [4/7]

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

Copy constructor from the Tmat6 mat.

Definition at line 185 of file mlMatrix6.h.

References Tmat6(), ml::FloatingPointMatrix< VectorT, size >::v, and ml::FloatingPointMatrix< Tvec6< DT >, 6 >::v.

◆ Tmat6() [5/7]

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

Constructor from 36 floats given as array mat, read row by row.

Constructor from 36 floats given as array mat.

Definition at line 197 of file mlMatrix6.h.

References setValues(), and Tmat6().

◆ Tmat6() [6/7]

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

Constructor from 36 doubles given as array mat, read row by row.

Constructor from 36 doubles given as array mat.

Definition at line 204 of file mlMatrix6.h.

References setValues(), and Tmat6().

◆ Tmat6() [7/7]

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 )

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

Definition at line 364 of file mlMatrix6.h.

References Tmat6(), and ml::FloatingPointMatrix< Tvec6< DT >, 6 >::v.

Member Function Documentation

◆ apply()

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

Applies the function fct to each component.

Definition at line 548 of file mlMatrix6.h.

References apply(), Tmat6(), and ml::FloatingPointMatrix< Tvec6< DT >, 6 >::v.

Referenced by apply().

◆ det()

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

Returns the determinant of this matrix.

Definition at line 481 of file mlMatrix6.h.

References det(), determinantLower5(), and ml::FloatingPointMatrix< Tvec6< DT >, 6 >::v.

Referenced by det().

◆ determinantLower5()

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

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

Definition at line 467 of file mlMatrix6.h.

References ml::Tmat5< DT >::det(), determinantLower5(), and ml::FloatingPointMatrix< Tvec6< DT >, 6 >::v.

Referenced by det(), and determinantLower5().

◆ getIdentity()

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

Returns the identity matrix.

Definition at line 534 of file mlMatrix6.h.

References getIdentity(), and Tmat6().

Referenced by getIdentity(), and inverse().

◆ getMat()

template<class DT>
Tmat6< DT > ml::Tmat6< DT >::getMat ( const double val)
inlinestatic

Returns a matrix filled with values val.

Definition at line 211 of file mlMatrix6.h.

References getMat(), and Tmat6().

Referenced by getMat().

◆ getValues() [1/2]

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

Copies the contents of *this into double array m. m must point to an array with at least 36 accessible entries, written row by row.

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

Definition at line 432 of file mlMatrix6.h.

References getValues(), and ml::FloatingPointMatrix< Tvec6< DT >, 6 >::v.

◆ getValues() [2/2]

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

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 36 accessible entries, written row by row.

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 36 accessible entries.

Definition at line 402 of file mlMatrix6.h.

References getValues(), and ml::FloatingPointMatrix< Tvec6< DT >, 6 >::v.

Referenced by getValues(), and getValues().

◆ inverse()

template<class DT>
Tmat6< DT > ml::Tmat6< DT >::inverse ( bool * isInvertible = nullptr) 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 501 of file mlMatrix6.h.

References getIdentity(), inverse(), ml::MLInverseMatHelper(), and Tmat6().

Referenced by inverse().

◆ operator*=()

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

Multiplies by a scalar constant d.

Multiplies by a constant d.

Definition at line 274 of file mlMatrix6.h.

References operator*=(), Tmat6(), and ml::FloatingPointMatrix< Tvec6< DT >, 6 >::v.

Referenced by operator*=().

◆ operator+=()

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

Adds component-wise with a Tmat6.

Adds component-wise by a Tmat6.

Definition at line 246 of file mlMatrix6.h.

References operator+=(), Tmat6(), ml::FloatingPointMatrix< VectorT, size >::v, and ml::FloatingPointMatrix< Tvec6< DT >, 6 >::v.

Referenced by operator+=().

◆ operator-=()

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

Subtracts component-wise by a Tmat6.

Definition at line 260 of file mlMatrix6.h.

References operator-=(), Tmat6(), ml::FloatingPointMatrix< VectorT, size >::v, and ml::FloatingPointMatrix< Tvec6< DT >, 6 >::v.

Referenced by operator-=().

◆ operator/=()

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

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

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

Definition at line 288 of file mlMatrix6.h.

References ML_CHECK_THROW, MLValueIs0WOM(), operator/=(), Tmat6(), and ml::FloatingPointMatrix< Tvec6< DT >, 6 >::v.

Referenced by operator/=().

◆ operator<()

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

Dummy 'lesser than operator' that always returns false. It is needed to make class work with some STL containers on VC7.

Definition at line 100 of file mlMatrix6.h.

◆ operator=()

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

Assigns from a Tmat6.

Assignment of a Tmat6.

Definition at line 230 of file mlMatrix6.h.

References operator=(), Tmat6(), ml::FloatingPointMatrix< VectorT, size >::v, and ml::FloatingPointMatrix< Tvec6< DT >, 6 >::v.

Referenced by operator=().

◆ set()

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

Sets all values to val.

Definition at line 223 of file mlMatrix6.h.

References set(), and ml::FloatingPointMatrix< Tvec6< DT >, 6 >::v.

Referenced by set().

◆ setScaleMatrix()

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

Sets the diagonal matrix with scale on the diagonal.

Definition at line 447 of file mlMatrix6.h.

References setScaleMatrix(), and ml::FloatingPointMatrix< Tvec6< DT >, 6 >::v.

Referenced by setScaleMatrix().

◆ setValues() [1/2]

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

Copies the contents from double array m into *this. m must point to an array with at least 36 valid entries, read row by row.

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

Definition at line 417 of file mlMatrix6.h.

References setValues(), and ml::FloatingPointMatrix< Tvec6< DT >, 6 >::v.

◆ setValues() [2/2]

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

Copies the contents from float array m into *this. m must point to an array with at least 36 valid entries, read row by row.

Copies the contents from float array m into *this. m must point to an array with at least 36 valid entries.

Definition at line 385 of file mlMatrix6.h.

References setValues(), and ml::FloatingPointMatrix< Tvec6< DT >, 6 >::v.

Referenced by setValues(), setValues(), Tmat6(), and Tmat6().

◆ transpose()

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

Returns the transposed of this matrix.

Definition at line 520 of file mlMatrix6.h.

References Tmat6(), transpose(), and ml::FloatingPointMatrix< Tvec6< DT >, 6 >::v.

Referenced by ml::operator*(), and transpose().


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