public class SimpleSVD<T extends SimpleBase>
extends java.lang.Object
Wrapper around SVD for simple matrix. See SingularValueDecomposition
for more details.
Tolerance for singular values is Math.max(mat.numRows,mat.numCols) * W.get(0,0) * UtilEjml.EPS; where W.get(0,0) is the largest singular value.
Constructor and Description |
---|
SimpleSVD(org.ejml.data.Matrix mat,
boolean compact) |
Modifier and Type | Method and Description |
---|---|
double |
getSingleValue(int index)
Returns the specified singular value.
|
double[] |
getSingularValues()
Returns an array of all the singular values
|
org.ejml.interfaces.decomposition.SingularValueDecomposition |
getSVD()
Returns the underlying decomposition that this is a wrapper around.
|
T |
getU()
Returns the orthogonal 'U' matrix.
|
T |
getV()
Returns the orthogonal 'V' matrix.
|
T |
getW()
Returns a diagonal matrix with the singular values.
|
int |
nullity()
The nullity of the decomposed matrix.
|
SimpleMatrix |
nullSpace()
Computes the null space from an SVD.
|
double |
quality()
Computes the quality of the computed decomposition.
|
int |
rank()
Returns the rank of the decomposed matrix.
|
public T getU()
Returns the orthogonal 'U' matrix.
public T getW()
public T getV()
Returns the orthogonal 'V' matrix.
public double quality()
Computes the quality of the computed decomposition. A value close to or less than 1e-15 is considered to be within machine precision.
This function must be called before the original matrix has been modified or else it will produce meaningless results.
public SimpleMatrix nullSpace()
SingularOps_DDRM.nullSpace(org.ejml.interfaces.decomposition.SingularValueDecomposition_F64<org.ejml.data.DMatrixRMaj>, org.ejml.data.DMatrixRMaj, double)
.public double getSingleValue(int index)
index
- Which singular value is to be returned.public double[] getSingularValues()
public int rank()
SingularOps_DDRM.rank(SingularValueDecomposition_F64, double)
public int nullity()
SingularOps_DDRM.nullity(SingularValueDecomposition_F64, double)
public org.ejml.interfaces.decomposition.SingularValueDecomposition getSVD()