cisst-saw
|
Declaration of nmrSVDEconomy. More...
#include <cisstCommon/cmnThrow.h>
#include <cisstVector/vctFixedSizeMatrix.h>
#include <cisstVector/vctDynamicMatrix.h>
#include <cisstNumerical/nmrNetlib.h>
#include <cisstNumerical/nmrExport.h>
Go to the source code of this file.
Classes | |
class | nmrSVDEconomyDynamicData |
Data for SVD problem (Dynamic). More... | |
class | nmrSVDEconomyDynamicData::Friend |
Functions | |
Algorithm SVD: Singular Value Decomposition | |
The nmrSVDEconomy functions compute the singular value decomposition (SVD) of a real where These functions are wrappers around the LAPACK routine dgesvd, therefore they share some features with the LAPACK routine:
The nmrSVDEconomy functions add the following features:
There are different ways to call this function to compute the SVD of the matrix A. These correspond to different overloaded nmrSVDEconomy functions:
| |
template<class _matrixOwnerType > | |
CISSTNETLIB_INTEGER | nmrSVDEconomy (vctDynamicMatrixBase< _matrixOwnerType, CISSTNETLIB_DOUBLE > &A, nmrSVDEconomyDynamicData &data) throw (std::runtime_error) |
template<class _matrixOwnerTypeA , class _matrixOwnerTypeU , class _vectorOwnerTypeS , class _matrixOwnerTypeVt , class _vectorOwnerTypeWorkspace > | |
CISSTNETLIB_INTEGER | nmrSVDEconomy (vctDynamicMatrixBase< _matrixOwnerTypeA, CISSTNETLIB_DOUBLE > &A, vctDynamicMatrixBase< _matrixOwnerTypeU, CISSTNETLIB_DOUBLE > &U, vctDynamicVectorBase< _vectorOwnerTypeS, CISSTNETLIB_DOUBLE > &S, vctDynamicMatrixBase< _matrixOwnerTypeVt, CISSTNETLIB_DOUBLE > &Vt, vctDynamicVectorBase< _vectorOwnerTypeWorkspace, CISSTNETLIB_DOUBLE > &Workspace) |
template<class _matrixOwnerTypeA , class _matrixOwnerTypeU , class _vectorOwnerTypeS , class _matrixOwnerTypeVt > | |
CISSTNETLIB_INTEGER | nmrSVDEconomy (vctDynamicMatrixBase< _matrixOwnerTypeA, CISSTNETLIB_DOUBLE > &A, vctDynamicMatrixBase< _matrixOwnerTypeU, CISSTNETLIB_DOUBLE > &U, vctDynamicVectorBase< _vectorOwnerTypeS, CISSTNETLIB_DOUBLE > &S, vctDynamicMatrixBase< _matrixOwnerTypeVt, CISSTNETLIB_DOUBLE > &Vt) |
Declaration of nmrSVDEconomy.
|
inline |
This function solves the SVD problem for a dynamic matrix using an nmrSVDEconomyDynamicData.
This function checks for valid input (size, storage order and compact) and calls the LAPACK function. If the input doesn't match the data, an exception is thrown (std::runtime_error
).
This function modifies the input matrix A and stores the results in the data. Each component of the result can be obtained via the const methods nmrSVDEconomyDynamicData::U(), nmrSVDEconomyDynamicData::S() and nmrSVDEconomyDynamicData::Vt().
A | A matrix of size MxN, either vctDynamicMatrix or vctDynamicMatrixRef. |
data | A data object corresponding to the input matrix. |
|
inline |
This function solves the SVD problem for a dynamic matrix using the storage provided by the user for both the output (U, S, Vt) and the workspace.
Internally, a data is created using the storage provided by the user (see nmrSVDEconomyDynamicData::SetRef). While the data is being build, the consistency of the output and workspace is checked. Then, the nmrSVDEconomy(A, data) function can be used safely.
A | is a reference to a dynamic matrix of size MxN |
U,S,Vt | The output matrices and vector for SVD |
Workspace | The workspace for LAPACK. |
|
inline |
This function solves the SVD problem for a dynamic matrix using the storage provided by the user for the output (U, S, Vt). A workspace will be dynamically allocated.
Internally, a data is created using the storage provided by the user (see nmrSVDEconomyDynamicData::SetRefOutput). While the data is being build, the consistency of the output is checked. Then, the nmrSVDEconomy(A, data) function can be used safely.
A | is a reference to a dynamic matrix of size MxN |
U,S,Vt | The output matrices and vector for SVD |