public class SVD extends Object implements SVDDecomposition
| Modifier and Type | Class and Description |
|---|---|
static class |
SVD.Method |
| Modifier and Type | Field and Description |
|---|---|
static SVD.Method |
DEFAULT_METHOD
The default algorithm for computing SVD.
|
| Constructor and Description |
|---|
SVD(Matrix A,
boolean doUV)
Runs the SVD decomposition on a matrix.
|
SVD(Matrix A,
boolean doUV,
double epsilon)
Runs the SVD decomposition on a matrix.
|
SVD(Matrix A,
boolean doUV,
double epsilon,
SVD.Method method)
Runs the SVD decomposition on a matrix.
|
| Modifier and Type | Method and Description |
|---|---|
DiagonalMatrix |
D()
Get the D matrix as in SVD decomposition.
|
double[] |
getSingularValues()
Get the normalized, hence positive, singular values.
|
Matrix |
U()
Get the U matrix as in SVD decomposition.
|
Matrix |
Ut()
Get the transpose of U, i.e.,
U().t(). |
Matrix |
V()
Get the V matrix as in SVD decomposition.
|
public static final SVD.Method DEFAULT_METHOD
public SVD(Matrix A, boolean doUV)
A - a matrixdoUV - false if to compute only the singular values but not U and
Vpublic SVD(Matrix A, boolean doUV, double epsilon)
A - a matrixdoUV - false if to compute only the singular values but not U and
Vepsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0public SVD(Matrix A, boolean doUV, double epsilon, SVD.Method method)
A - a matrixdoUV - false if to compute only the singular values but not U and
Vepsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0method - the algorithm for computing the decompositionpublic double[] getSingularValues()
SVDDecompositiongetSingularValues in interface SVDDecompositionpublic DiagonalMatrix D()
SVDDecompositionD in interface SVDDecompositionpublic Matrix U()
SVDDecompositionU in interface SVDDecompositionpublic Matrix Ut()
SVDDecompositionU().t().Ut in interface SVDDecompositionU().t()public Matrix V()
SVDDecompositionV in interface SVDDecompositionCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.