Module: Linear Algebra Group: Decomposition classes
Does not inherit
#include <rw/lapack/svdcalc.h>
Computes a singular value decomposition of a matrix A. Based on the LAPACK routine xgesvd. This class may be used as the SVDCalc template parameter for the classes RWSVDecomp<T,SVDCalc>, RWSVServer<T,SVDCalc> and RWLeastSqSV<T, SVDCalc>.
static bool computeSVD(const RWGenMat<T>& A,
RWGenMat<T>& U,
RWGenMat<T>& VT,
RWMathVec<norm_type>& sigma,
norm_type tolerance = 0,
int numLeftVecs = -1
int numRightVecs = -1);
where norm_type is a typedef for rw_numeric_traits<T>::norm_type.
Parameter List:
A |
The input matrix for which the singular value decomposition is being computed. |
U |
The output matrix of left singular victors (the columns of U are the left singular vectors). |
VT |
The output matrix of right singular victors (the rows of VT are the right singular victors). |
sigma |
The output vector of singular values in descending order. |
tolerance |
The input singular values with magnitude less than tolerance will be set to zero. |
numLeftVectors |
The input number of left vectors to compute. If the number is less than zero, the default number of vectors will be computed (it is up to the developer to determine what the default is). |
numRightVectors |
The input number of right vectors to compute. If the number is less than zero, the default number of vectors will be computed (it is up to the developer to determine what the default is). |
The return value is true if the decomposition was successfully computed.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.