cisst-saw
|
#include <nmrPInverseSolver.h>
Public Member Functions | |
nmrPInverseSolver (void) | |
nmrPInverseSolver (CISSTNETLIB_INTEGER m, CISSTNETLIB_INTEGER n, bool storageOrder=VCT_COL_MAJOR) | |
void | Allocate (CISSTNETLIB_INTEGER m, CISSTNETLIB_INTEGER n, bool storageOrder) |
const vctDynamicMatrix < CISSTNETLIB_DOUBLE > & | GetS (void) const |
const vctDynamicMatrix < CISSTNETLIB_DOUBLE > & | GetU (void) const |
const vctDynamicMatrix < CISSTNETLIB_DOUBLE > & | GetV (void) const |
const vctDynamicMatrix < CISSTNETLIB_DOUBLE > & | GetPInverse (void) const |
nmrPInverseSolver (const vctDynamicMatrix< CISSTNETLIB_DOUBLE > &A) | |
void | Allocate (const vctDynamicMatrix< CISSTNETLIB_DOUBLE > &A) |
template<class _matrixOwnerType > | |
void | Solve (vctDynamicMatrixBase< _matrixOwnerType, CISSTNETLIB_DOUBLE > &A) throw (std::runtime_error) |
Protected Attributes | |
CISSTNETLIB_INTEGER | M |
CISSTNETLIB_INTEGER | N |
CISSTNETLIB_INTEGER | MaxMN |
CISSTNETLIB_INTEGER | MinMN |
CISSTNETLIB_DOUBLE | EPS |
vctDynamicMatrix < CISSTNETLIB_DOUBLE > | S |
vctDynamicMatrix < CISSTNETLIB_DOUBLE > | U |
vctDynamicMatrix < CISSTNETLIB_DOUBLE > | V |
vctDynamicMatrix < CISSTNETLIB_DOUBLE > | PInverseA |
bool | StorageOrder |
nmrSVDSolver | svd |
Algorithm P-Inverse: Moore-Penrose pseudo-inverse Calculates the Moore-Penrose pseudo-inverse of the M by N matrix A, and stores the result in PInverseA. The singular values of A are returned in S. The left singular vectors are returned in U, and the right singular vectors are returned in V.
where is a
matrix which is zero except for its min(m,n) diagonal elements, U is a
orthogonal matrix, and V is a
orthogonal matrix. The diagonal elements of
are the reciprocal of non-zero singular values of A; they are real and non-negative, and are returned in descending order. The first
columns of U and V are the left and right singular vectors of A.
The data members of this class are:
|
inline |
Default constructor. This constructor doesn't allocate any memory. If you use this constructor, you will need to use one of the Allocate() methods before you can use the Solve method.
|
inline |
Constructor with memory allocation. This constructor allocates the memory based on M and N. It relies on the method Allocate(). The next call to the Solve() method will check that the parameters match the dimension.
m | Number of rows of A |
n | Number of columns of A |
storageOrder | Storage order used for the input matrix. This order will be used for the output as well. |
|
inline |
Constructor with memory allocation. This constructor allocates the memory based on the actual input of the Solve() method. It relies on the method Allocate(). The next call to the Solve() method will check that the parameters match the dimension and storage order.
|
inline |
This method allocates the memory based on M and N. The next call to the Solve() method will check that the parameters match the dimension.
m | Number of rows of A |
n | Number of columns of A |
storageOrder | Storage order used for all the matrices |
|
inline |
Allocate memory to solve this problem. This method provides a convenient way to extract the required sizes from the input containers. The next call to the Solve() method will check that the parameters match the dimension.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
This computes the Moore-Penrose pseudo-inverse of a real matrix A, optionally computing the left and/or right singular vectors. The SVD is written:
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |