|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SingularValueDecomposition<T extends Matrix64F>
This is an abstract class for computing the singular value decomposition (SVD) of a matrix, which is defined
as:
The dimension of U,W,V depends if it is a compact SVD or not. If not compact then U is m by m, W is m by n, V is n by n. If compact then let s be the number of singular values, U is m by s, W is s by s, and V is n by s.
To create a new instance of SingularValueDecomposition see DecompositionFactory.svd(int, int)
and SingularOps contains additional helpful SVD related functions.
*Note* that the ordering of singular values is not guaranteed, unless done so by a specific implementation.
The singular values can be put into descending order while adjusting U and V using SingularOps.descendingOrder(org.ejml.data.DenseMatrix64F, boolean, org.ejml.data.DenseMatrix64F, org.ejml.data.DenseMatrix64F, boolean) SingularOps.descendingOrder()}.
| Method Summary | |
|---|---|
double[] |
getSingularValues()
Returns the singular values. |
T |
getU(boolean transposed)
Returns the orthogonal 'U' matrix. |
T |
getV(boolean transposed)
Returns the orthogonal 'V' matrix. |
T |
getW(T W)
Returns a diagonal matrix with the singular values. |
boolean |
isCompact()
If true then compact matrices are returned. |
int |
numberOfSingularValues()
The number of singular values in the matrix. |
int |
numCols()
Number of columns in the decomposed matrix. |
int |
numRows()
Number of rows in the decomposed matrix. |
| Methods inherited from interface org.ejml.alg.dense.decomposition.DecompositionInterface |
|---|
decompose, inputModified |
| Method Detail |
|---|
double[] getSingularValues()
int numberOfSingularValues()
boolean isCompact()
T getU(boolean transposed)
Returns the orthogonal 'U' matrix.
Internally the SVD algorithm might compute U transposed or it might not. To avoid an unnecessary double transpose the option is provided to select if the transpose is returned.
transposed - If the returned U is transposed.
T getV(boolean transposed)
Returns the orthogonal 'V' matrix.
Internally the SVD algorithm might compute V transposed or it might not. To avoid an unnecessary double transpose the option is provided to select if the transpose is returned.
transposed - If the returned V is transposed.
T getW(T W)
W - If not null then the W matrix is written to it. Modified.
int numRows()
int numCols()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||