public class SingularValueDecomposition extends Object implements Serializable
The singular values, sigma[k] = S[k][k], are ordered so that sigma[0] >= sigma[1] >= ... >= sigma[n-1].
The singular value decomposition always exists, so the constructor will never fail. The matrix condition number and the effective numerical rank can be computed from this decomposition.
Constructor and Description |
---|
SingularValueDecomposition(DoubleMatrix2D Arg)
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).
|
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 SingularValueDecomposition(DoubleMatrix2D Arg)
A
- A rectangular matrix.IllegalArgumentException
- if A.rows() < A.columns().public double cond()
public DoubleMatrix2D getS()
public double[] getSingularValues()
public DoubleMatrix2D getU()
public DoubleMatrix2D getV()
public double norm2()
public int rank()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.