LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::matrixInversion< T > Class Template Reference
[Linear Algebra]

Matrix inversion functor. More...

#include <ltiMatrixInversion.h>

Inheritance diagram for lti::matrixInversion< T >:
Inheritance graph
[legend]
Collaboration diagram for lti::matrixInversion< T >:
Collaboration graph
[legend]

List of all members.

Classes

class  parameters
 parameters class for lti::matrixInversion functor More...

Public Member Functions

 matrixInversion ()
virtual ~matrixInversion ()
bool apply (const matrix< T > &theMatrix, matrix< T > &theInverse) const
bool apply (matrix< T > &theMatrix) const
virtual functorclone () const
void useLUD ()
void useSVD ()
virtual const char * getTypeName () const
const parametersgetParameters () const

Static Protected Attributes

static const T my_epsilon

Detailed Description

template<class T>
class lti::matrixInversion< T >

Matrix inversion functor.

Computes the inverse of a matrix using LU decomposition. Only use this functor if the inverse of a matrix is needed explicity! To solve an equation system Ax=b or a set of equation systems AX=B it is more efficient to use the LU solution method (solve Ax=b resp. AX[i]=B[i]) directly than inverting A and multiplying the result by b resp. B!

If the parameter value method is set to SVD, a singular value decomposition is used to invert the matrix, instead of the LU decomposition method.

The apply() methods return false if the matrix is singular or close to being singular. This is defined by checking that the smalles singular value is greater than std::numeric_limits<T>::epsilon() for SVD and internally in the LU decomposition.

For small (2x2,3x3 or 4x4) symmetric matrices you can also use lti::symmetricMatrixInversion.


Constructor & Destructor Documentation

template<class T>
lti::matrixInversion< T >::matrixInversion (  ) 

default constructor

template<class T>
virtual lti::matrixInversion< T >::~matrixInversion (  )  [inline, virtual]

destructor


Member Function Documentation

template<class T>
bool lti::matrixInversion< T >::apply ( matrix< T > &  theMatrix  )  const

onPlace version of apply.

Parameters:
theMatrix matrix to be inverted. The result will be left here too.
Returns:
true if inversion was possible, false otherwise.
template<class T>
bool lti::matrixInversion< T >::apply ( const matrix< T > &  theMatrix,
matrix< T > &  theInverse 
) const

onCopy version of apply.

Parameters:
theMatrix matrix to be inverted
theInverse inverted matrix
Returns:
true if inversion was possible, false otherwise.
template<class T>
virtual functor* lti::matrixInversion< T >::clone (  )  const [inline, virtual]

returns a pointer to a clone of the functor.

Implements lti::functor.

template<class T>
const parameters& lti::matrixInversion< T >::getParameters (  )  const

get a constant reference to the actual used parameters.

Reimplemented from lti::functor.

template<class T>
virtual const char* lti::matrixInversion< T >::getTypeName ( void   )  const [inline, virtual]

returns the name of this type

Reimplemented from lti::linearAlgebraFunctor.

template<class T>
void lti::matrixInversion< T >::useLUD (  ) 

change the used parameters in order to used the LU-decomposition method for matrix inversion.

template<class T>
void lti::matrixInversion< T >::useSVD (  ) 

change the used parameters in order to used the singular value decomposition method for matrix inversion.


Member Data Documentation

template<class T>
const T lti::matrixInversion< T >::my_epsilon [static, protected]

smallest value of type T, which can be added to 0 in order to produce a number different than zero.


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

Generated on Sat Apr 10 15:28:31 2010 for LTI-Lib by Doxygen 1.6.1