cisst-saw
Loading...
Searching...
No Matches
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_MAJORMatrixTypeA
typedef vctFixedSizeVector< CISSTNETLIB_INTEGER, MIN_MNVectorTypePivotIndices
typedef vctFixedSizeMatrix< CISSTNETLIB_DOUBLE, _rows, _rows, VCT_COL_MAJORMatrixTypeP
typedef vctFixedSizeMatrix< CISSTNETLIB_DOUBLE, _rows, MIN_MN, VCT_COL_MAJORMatrixTypeL
typedef vctFixedSizeMatrix< CISSTNETLIB_DOUBLE, MIN_MN, _cols, VCT_COL_MAJORMatrixTypeU

Public Member Functions

 nmrLUFixedSizeData ()
const VectorTypePivotIndicesPivotIndices (void) const

Static Public Member Functions

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

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:

nmrLUFixedSizeData()
Definition nmrLU.h:517
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

◆ MatrixTypeA

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).

◆ MatrixTypeL

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.

◆ MatrixTypeP

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.

◆ MatrixTypeU

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.

◆ size_type

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

◆ VectorTypePivotIndices

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

◆ anonymous enum

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

Constructor & Destructor Documentation

◆ nmrLUFixedSizeData()

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

◆ PivotIndices()

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.

◆ UpdateMatrixLU()

template<vct::size_type _rows, vct::size_type _cols>
void nmrLUFixedSizeData< _rows, _cols >::UpdateMatrixLU ( const MatrixTypeA & A,
MatrixTypeL & L,
MatrixTypeU & U )
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

◆ UpdateMatrixP()

template<vct::size_type _rows, vct::size_type _cols>
MatrixTypeP & nmrLUFixedSizeData< _rows, _cols >::UpdateMatrixP ( const VectorTypePivotIndices & pivotIndices,
MatrixTypeP & P )
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.

◆ Friend

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

Member Data Documentation

◆ PivotIndicesMember

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: