public class DenseDoubleSingularValueDecomposition extends Object
The singular values, sigma[k] = S[k][k], are ordered so that sigma[0] >= sigma[1] >= ... >= sigma[min(m-1,n-1)].
This implementation uses the divide-and-conquer algorithm (dgesdd) from LAPACK.
Constructor and Description |
---|
DenseDoubleSingularValueDecomposition(DoubleMatrix2D A,
boolean wantUV,
boolean wantWholeUV)
Constructs and returns a new singular value decomposition object; The
decomposed matrices can be retrieved via instance methods of the returned
decomposition object.
|
Modifier and Type | Method and Description |
---|---|
double |
cond()
Returns the two norm condition number, which is max(S) / min(S).
|
org.netlib.util.intW |
getInfo()
Returns the output flag
|
DoubleMatrix2D |
getS()
Returns the diagonal matrix of singular values.
|
double[] |
getSingularValues()
Returns the diagonal of S, which is a one-dimensional array of
singular values
|
DoubleMatrix2D |
getU()
Returns the left singular vectors U.
|
DoubleMatrix2D |
getV()
Returns the right singular vectors V.
|
double |
norm2()
Returns the two norm, which is max(S).
|
int |
rank()
Returns the effective numerical matrix rank, which is the number of
nonnegligible singular values.
|
String |
toString()
Returns a String with (propertyName, propertyValue) pairs.
|
public DenseDoubleSingularValueDecomposition(DoubleMatrix2D A, boolean wantUV, boolean wantWholeUV)
A
- rectangular matrixwantUV
- if true then all matrices (U, S, V') are computed; otherwise
only S is computedwantWholeUV
- if true then all m columns of U and all n rows of V' are
computed; otherwise only the first min(m,n) columns of U and
the first min(m,n) rows of V' are computedpublic double cond()
public DoubleMatrix2D getS()
public double[] getSingularValues()
public DoubleMatrix2D getU()
public DoubleMatrix2D getV()
public org.netlib.util.intW getInfo()
public double norm2()
public int rank()
Jump to the Parallel Colt Homepage