cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Friends | List of all members
nmrLUFixedSizeData< _rows, _cols > Class Template Reference

Data of LU problem (Fixed size). More...

#include <nmrLU.h>

Classes

class  Friend
 

Public Types

enum  { MIN_MN = (_rows < _cols) ? _rows : _cols }
 
typedef vct::size_type size_type
 
typedef vctFixedSizeMatrix
< CISSTNETLIB_DOUBLE, _rows,
_cols, VCT_COL_MAJOR
MatrixTypeA
 
typedef vctFixedSizeVector
< CISSTNETLIB_INTEGER, MIN_MN
VectorTypePivotIndices
 
typedef vctFixedSizeMatrix
< CISSTNETLIB_DOUBLE, _rows,
_rows, VCT_COL_MAJOR
MatrixTypeP
 
typedef vctFixedSizeMatrix
< CISSTNETLIB_DOUBLE, _rows,
MIN_MN, VCT_COL_MAJOR
MatrixTypeL
 
typedef vctFixedSizeMatrix
< CISSTNETLIB_DOUBLE, MIN_MN,
_cols, VCT_COL_MAJOR
MatrixTypeU
 

Public Member Functions

 nmrLUFixedSizeData ()
 
const VectorTypePivotIndicesPivotIndices (void) const
 

Static Public Member Functions

static MatrixTypePUpdateMatrixP (const VectorTypePivotIndices &pivotIndices, MatrixTypeP &P) throw (std::runtime_error)
 
static void UpdateMatrixLU (const MatrixTypeA &A, MatrixTypeL &L, MatrixTypeU &U) throw (std::runtime_error)
 

Protected Attributes

VectorTypePivotIndices PivotIndicesMember
 

Friends

class Friend
 

Detailed Description

template<vct::size_type _rows, vct::size_type _cols>
class nmrLUFixedSizeData< _rows, _cols >

Data of LU problem (Fixed size).

This class is similar to nmrLUDynamicData except that it is dedicated to fixed size containers. While nmrLUDynamicData is designed to be modified dynamically, nmrLUFixedSizeData is fully defined at compilation time using template parameters. The required parameters are the dimensions of the input matrix:

Note
An object of type nmrLUFixedSizeData contains the memory required for the output, i.e. its actual size will be equal to the memory required to store the vector PivotIndices.
There is no dynamic memory allocation (no new) and the memory can not be used by reference. To use memory by reference, one must use nmrLUDynamicData with vctDynamicMatrixRef and vctDynamicVectorRef (these dynamic references can actually be used to overlay a fixed size container).

Member Typedef Documentation

template<vct::size_type _rows, vct::size_type _cols>
typedef vctFixedSizeMatrix<CISSTNETLIB_DOUBLE, _rows, _cols, VCT_COL_MAJOR> nmrLUFixedSizeData< _rows, _cols >::MatrixTypeA

Type of the input matrix A (size computed from the data template parameters).

template<vct::size_type _rows, vct::size_type _cols>
typedef vctFixedSizeMatrix<CISSTNETLIB_DOUBLE, _rows, MIN_MN, VCT_COL_MAJOR> nmrLUFixedSizeData< _rows, _cols >::MatrixTypeL

Type used to create the L matrix from the input matrix (A) after nmrLU has been called.

template<vct::size_type _rows, vct::size_type _cols>
typedef vctFixedSizeMatrix<CISSTNETLIB_DOUBLE, _rows, _rows, VCT_COL_MAJOR> nmrLUFixedSizeData< _rows, _cols >::MatrixTypeP

Type used to create the permutation matrix from the vector PivotIndices.

template<vct::size_type _rows, vct::size_type _cols>
typedef vctFixedSizeMatrix<CISSTNETLIB_DOUBLE, MIN_MN, _cols, VCT_COL_MAJOR> nmrLUFixedSizeData< _rows, _cols >::MatrixTypeU

Type used to create the U matrix from the input matrix (A) after nmrLU has been called.

template<vct::size_type _rows, vct::size_type _cols>
typedef vct::size_type nmrLUFixedSizeData< _rows, _cols >::size_type
template<vct::size_type _rows, vct::size_type _cols>
typedef vctFixedSizeVector<CISSTNETLIB_INTEGER, MIN_MN> nmrLUFixedSizeData< _rows, _cols >::VectorTypePivotIndices

Type of the output vector PivotIndices (size computed from the data template parameters).

Member Enumeration Documentation

template<vct::size_type _rows, vct::size_type _cols>
anonymous enum
Enumerator
MIN_MN 

Constructor & Destructor Documentation

template<vct::size_type _rows, vct::size_type _cols>
nmrLUFixedSizeData< _rows, _cols >::nmrLUFixedSizeData ( )
inline

Default constructor. Does nothing since the allocation is performed on the stack.

Member Function Documentation

template<vct::size_type _rows, vct::size_type _cols>
const VectorTypePivotIndices& nmrLUFixedSizeData< _rows, _cols >::PivotIndices ( void  ) const
inline

Const reference to the result vector PivotIndices. This method must be called after the data has been computed by the nmrLU function.

template<vct::size_type _rows, vct::size_type _cols>
static void nmrLUFixedSizeData< _rows, _cols >::UpdateMatrixLU ( const MatrixTypeA A,
MatrixTypeL L,
MatrixTypeU U 
)
throw (std::runtime_error
)
inlinestatic

Helper method to create usable matrix L and U from the input matrix used and modified by nmrLU. The output of nmrLU is a single matrix which contains both L and U. This method splits the output of nmrLU and creates to matrices by copying the lower and upper parts respectively in L and U, setting all other elements to zero. The diagonal of the output is copied to U while all the elements of the diagonal of L are set to 1.

Note
This method must be called after the nmrLU function has been called.
Parameters
AThe matrix decomposed using nmrLU.
LThe lower matrix
UThe upper matrix
template<vct::size_type _rows, vct::size_type _cols>
static MatrixTypeP& nmrLUFixedSizeData< _rows, _cols >::UpdateMatrixP ( const VectorTypePivotIndices pivotIndices,
MatrixTypeP P 
)
throw (std::runtime_error
)
inlinestatic

Helper method to create a usable permutation matrix from the vector of pivot indices created by nmrLU.

Note
This method must be called after the nmrLU function has been called.
Parameters
pivotIndicesThe vector of pivot indices as computed by nmrLU
PThe permutation matrix updated from the pivot indices.

Friends And Related Function Documentation

template<vct::size_type _rows, vct::size_type _cols>
friend class Friend
friend

Member Data Documentation

template<vct::size_type _rows, vct::size_type _cols>
VectorTypePivotIndices nmrLUFixedSizeData< _rows, _cols >::PivotIndicesMember
protected

Data member used to store the output vector PivotIndices.


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