cisst-saw
Loading...
Searching...
No Matches
nmrPInverseEconomy.h File Reference

Declaration of nmrPInverseEconomy. More...

Go to the source code of this file.

Classes

class  nmrPInverseEconomyDynamicData
class  nmrPInverseEconomyDynamicData::Friend

Functions

template<class _matrixOwnerType>
CISSTNETLIB_INTEGER nmrPInverseEconomy (vctDynamicMatrixBase< _matrixOwnerType, CISSTNETLIB_DOUBLE > &A, nmrPInverseEconomyDynamicData &data) CISST_THROW(std
template<class _matrixOwnerTypeA, class _matrixOwnerTypePInverse, class _vectorOwnerTypeWorkspace>
CISSTNETLIB_INTEGER nmrPInverseEconomy (vctDynamicMatrixBase< _matrixOwnerTypeA, CISSTNETLIB_DOUBLE > &A, vctDynamicMatrixBase< _matrixOwnerTypePInverse, CISSTNETLIB_DOUBLE > &pInverse, vctDynamicVectorBase< _vectorOwnerTypeWorkspace, CISSTNETLIB_DOUBLE > &workspace)
template<class _matrixOwnerTypeA, class _matrixOwnerTypePInverse>
CISSTNETLIB_INTEGER nmrPInverseEconomy (vctDynamicMatrixBase< _matrixOwnerTypeA, CISSTNETLIB_DOUBLE > &A, vctDynamicMatrixBase< _matrixOwnerTypePInverse, CISSTNETLIB_DOUBLE > &pInverse)

Detailed Description

Declaration of nmrPInverseEconomy.

Function Documentation

◆ nmrPInverseEconomy() [1/3]

template<class _matrixOwnerType>
CISSTNETLIB_INTEGER nmrPInverseEconomy ( vctDynamicMatrixBase< _matrixOwnerType, CISSTNETLIB_DOUBLE > & A,
nmrPInverseEconomyDynamicData & data )
inline

This function checks for valid input and calls the LAPACK function. The approach behind this defintion of the function is that the user creates a data object from a code wherein it is safe to do memory allocation. This data object is then passed on to this method along with the matrix whose PInverse is to be computed. The data object has members S, U, Vt and PInverse, which can be accessed through calls to method *() along with adequate workspace for LAPACK. This function modifies the contents of matrix A. For details about nature of the data matrices see text above.

Parameters
AA matrix of size MxN
dataA data object of one of the types corresponding to input matrix
Test
nmrPInverseEconomyTest::TestDynamicColumnMajor nmrPInverseEconomyTest::TestDynamicRowMajor nmrPInverseEconomyTest::TestDynamicColumnMajorUserAlloc nmrPInverseEconomyTest::TestDynamicRowMajorUserAlloc

◆ nmrPInverseEconomy() [2/3]

template<class _matrixOwnerTypeA, class _matrixOwnerTypePInverse>
CISSTNETLIB_INTEGER nmrPInverseEconomy ( vctDynamicMatrixBase< _matrixOwnerTypeA, CISSTNETLIB_DOUBLE > & A,
vctDynamicMatrixBase< _matrixOwnerTypePInverse, CISSTNETLIB_DOUBLE > & pInverse )
inline

Basic version of PInverse where user provides the input matrix as well as storage for output. The PInverse method verifies that the size of the data objects matches the input and allocates workspace memory, which is deallocated when the function ends. This function modifies the contents of matrix A. For sizes of other matrices see text above.

Parameters
AA dynamic matrix of size MxN
pInverseThe output matrices and vector for PInverse
Test
nmrPInverseEconomyTest::TestDynamicColumnMajorUserAlloc nmrPInverseEconomyTest::TestDynamicRowMajorUserAlloc

◆ nmrPInverseEconomy() [3/3]

template<class _matrixOwnerTypeA, class _matrixOwnerTypePInverse, class _vectorOwnerTypeWorkspace>
CISSTNETLIB_INTEGER nmrPInverseEconomy ( vctDynamicMatrixBase< _matrixOwnerTypeA, CISSTNETLIB_DOUBLE > & A,
vctDynamicMatrixBase< _matrixOwnerTypePInverse, CISSTNETLIB_DOUBLE > & pInverse,
vctDynamicVectorBase< _vectorOwnerTypeWorkspace, CISSTNETLIB_DOUBLE > & workspace )
inline

Basic version of PInverse where user provides the input matrix as well as storage for output and workspace needed by LAPACK. No memory allocation is done in this function, user allocates everything including workspace. The PInverse method verifies that the size of the data objects matchesc the input. See static methods in nmrPInverseEconomyDynamicData for helper functions that help determine the min workspace required. This function modifies the contents of matrix A. For sizes of other matrices see text above.

Parameters
AA dynamic matrix of size MxN
pInverseThe output matrix for PInverse
workspaceThe workspace for LAPACK.
Test
nmrPInverseEconomyTest::TestDynamicColumnMajorUserAlloc nmrPInverseEconomyTest::TestDynamicRowMajorUserAlloc