STK++ 0.9.13
STK::InvertMatrix< Matrix, Size_ > Class Template Reference

The InvertMatrix class is a functor class allowing to compute the inverse of a symmetric matrix. More...

#include <STK_InvertMatrix.h>

Public Types

enum  { size_ = Size_ , structure_ = hidden::AlgebraTraits< InvertMatrix<Matrix, Size_> >::structure_ }
 
typedef hidden::AlgebraTraits< InvertMatrix< Matrix, Size_ > >::Dispatcher Dispatcher
 
typedef hidden::AlgebraTraits< InvertMatrix< Matrix, Size_ > >::Result Result
 
typedef Matrix::Type Type
 

Public Member Functions

 InvertMatrix (Matrix const &m)
 Constructor.
 
 ~InvertMatrix ()
 Destructor.
 
Result constinv () const
 
Type constdet () const
 
bool isInvertible () const
 
Result constoperator() ()
 compute the inverse of the matrix m_.
 

Protected Attributes

Result inv_
 The inverse (or adjugate matrix if det_ is zero) of m_.
 
Type det_
 determinant of the matrix m_
 

Detailed Description

template<class Matrix, int Size_>
class STK::InvertMatrix< Matrix, Size_ >

The InvertMatrix class is a functor class allowing to compute the inverse of a symmetric matrix.

Warning
To use with matrices whom first index start at zero with fixed size matrix from 1 to 4, arbitrary first index is not implemented yet for these matrices.

Definition at line 156 of file STK_InvertMatrix.h.

Member Typedef Documentation

◆ Dispatcher

Definition at line 164 of file STK_InvertMatrix.h.

◆ Result

Definition at line 165 of file STK_InvertMatrix.h.

◆ Type

template<class Matrix , int Size_>
typedef Matrix::Type STK::InvertMatrix< Matrix, Size_ >::Type

Definition at line 166 of file STK_InvertMatrix.h.

Member Enumeration Documentation

◆ anonymous enum

template<class Matrix , int Size_>
anonymous enum
Enumerator
size_ 
structure_ 

Definition at line 159 of file STK_InvertMatrix.h.

160 {
161 size_ = Size_,
162 structure_ = hidden::AlgebraTraits< InvertMatrix<Matrix, Size_> >::structure_
163 };

Constructor & Destructor Documentation

◆ InvertMatrix()

template<class Matrix , int Size_>
STK::InvertMatrix< Matrix, Size_ >::InvertMatrix ( Matrix const m)
inline

Constructor.

Definition at line 168 of file STK_InvertMatrix.h.

169 : inv_()
170 , det_(Dispatcher::run(m, inv_))
171 { inv_.shift(m.beginRows());}
Type det_
determinant of the matrix m_
Result inv_
The inverse (or adjugate matrix if det_ is zero) of m_.

◆ ~InvertMatrix()

template<class Matrix , int Size_>
STK::InvertMatrix< Matrix, Size_ >::~InvertMatrix ( )
inline

Destructor.

Definition at line 173 of file STK_InvertMatrix.h.

173{}

Member Function Documentation

◆ det()

template<class Matrix , int Size_>
Type const & STK::InvertMatrix< Matrix, Size_ >::det ( ) const
inline
Returns
the determinant of the matrix m_

Definition at line 178 of file STK_InvertMatrix.h.

178{ return det_;}

◆ inv()

template<class Matrix , int Size_>
Result const & STK::InvertMatrix< Matrix, Size_ >::inv ( ) const
inline
Returns
the inverse of the matrix m_

Definition at line 176 of file STK_InvertMatrix.h.

176{ return inv_;}

◆ isInvertible()

template<class Matrix , int Size_>
bool STK::InvertMatrix< Matrix, Size_ >::isInvertible ( ) const
inline
Returns
true if the matrix m_ is invertible, false otherwise

Definition at line 180 of file STK_InvertMatrix.h.

180{ return(det_!=0);}

◆ operator()()

template<class Matrix , int Size_>
Result const & STK::InvertMatrix< Matrix, Size_ >::operator() ( )
inline

compute the inverse of the matrix m_.

Definition at line 183 of file STK_InvertMatrix.h.

183{ return inv_;}

Member Data Documentation

◆ det_

template<class Matrix , int Size_>
Type STK::InvertMatrix< Matrix, Size_ >::det_
protected

determinant of the matrix m_

Definition at line 189 of file STK_InvertMatrix.h.

◆ inv_

template<class Matrix , int Size_>
Result STK::InvertMatrix< Matrix, Size_ >::inv_
protected

The inverse (or adjugate matrix if det_ is zero) of m_.

Definition at line 187 of file STK_InvertMatrix.h.


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