Collaboration diagram for base::SVD:
Public Member Functions | |
SVD (const Matrix &A) | |
Decompose Matrix A, of M rows and N columns, M>=N. | |
const Matrix & | U () const |
Return U. | |
const Matrix & | V () const |
Return V. | |
const Vector | diag () const |
Return vector of singular values ( min(M,N)x1 ). | |
Matrix | S () const |
Return S - diagonal matrix of singular values (diagonal elements are diag() ). | |
Real | condition (Real maxCond=maxCondition) const |
Return condition number (max singular value / min singular value). | |
Matrix | inv (Real minSingVal=minSingValue) const |
pseudo-inverse of A | |
Static Public Attributes | |
const Real | maxCondition |
const Real | minSingValue |
A = U * S * V'
where matrices U and V are orthogonal and S is a digonal matrix.
The singular value decomposition is performed by constructing an SVD object from an M*N matrix A with M>=N (that is, at least as many rows as columns). Note, in case M > N, matrix S has to be a M*N diagonal matrix. However, it has only N diag elements, which we store in a 1:N Vector sig.
This code is based on the Numerical Recipies in C book.
Definition at line 51 of file SVD.
|
Decompose Matrix A, of M rows and N columns, M>=N.
|
|
Return condition number (max singular value / min singular value). (S_max/S_min) |
|
Return vector of singular values ( min(M,N)x1 ).
|
|
pseudo-inverse of A
|
|
Return S - diagonal matrix of singular values (diagonal elements are diag() ).
|
|
Return U.
|
|
Return V.
|
|
|
|
|