public class SVDecompositionCommonsResult extends Object implements SVDecompositionResult
SVDecompositionCommons.| Constructor and Description |
|---|
SVDecompositionCommonsResult(org.apache.commons.math3.linear.SingularValueDecomposition svd)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getConditionNumber()
Returns the condition number of the matrix.
|
double |
getNorm()
Returns the $L_2$ norm of the matrix.
|
int |
getRank()
Returns the effective numerical matrix rank.
|
DoubleMatrix |
getS()
Returns the diagonal matrix $\mathbf{\Sigma}$ of the decomposition.
|
double[] |
getSingularValues()
Returns the diagonal elements of the matrix $\mathbf{\Sigma}$ of the decomposition.
|
DoubleMatrix |
getU()
Returns the matrix $\mathbf{U}$ of the decomposition.
|
DoubleMatrix |
getUT()
Returns the transpose of the matrix $\mathbf{U}$ of the decomposition.
|
DoubleMatrix |
getV()
Returns the matrix $\mathbf{V}$ of the decomposition.
|
DoubleMatrix |
getVT()
Returns the transpose of the matrix $\mathbf{V}$ of the decomposition.
|
double[] |
solve(double[] b)
Solves $\mathbf{A}x = b$ where $\mathbf{A}$ is a (decomposed) matrix and $b$ is a vector.
|
DoubleArray |
solve(DoubleArray b)
Solves $\mathbf{A}x = b$ where $\mathbf{A}$ is a (decomposed) matrix and $b$ is a vector.
|
DoubleMatrix |
solve(DoubleMatrix b)
Solves $\mathbf{A}x = \mathbf{B}$ where $\mathbf{A}$ is a (decomposed) matrix and $\mathbf{B}$ is a matrix.
|
public SVDecompositionCommonsResult(org.apache.commons.math3.linear.SingularValueDecomposition svd)
svd - The result of the SV decomposition, not nullpublic double getConditionNumber()
getConditionNumber in interface SVDecompositionResultpublic double getNorm()
The $L_2$ norm is $\max\left(\frac{|\mathbf{A} \times U|_2}{|U|_2}\right)$, where $|.|_2$ denotes the vectorial 2-norm (i.e. the traditional Euclidian norm).
getNorm in interface SVDecompositionResultpublic int getRank()
The effective numerical rank is the number of non-negligible singular values. The threshold used to identify non-negligible terms is $\max(m, n) \times \mathrm{ulp}(S_1)$, where $\mathrm{ulp}(S_1)$ is the least significant bit of the largest singular value.
getRank in interface SVDecompositionResultpublic DoubleMatrix getS()
$\mathbf{\Sigma}$ is a diagonal matrix. The singular values are provided in non-increasing order.
getS in interface SVDecompositionResultpublic double[] getSingularValues()
The singular values are provided in non-increasing order.
getSingularValues in interface SVDecompositionResultpublic DoubleMatrix getU()
$\mathbf{U}$ is an orthogonal matrix, i.e. its transpose is also its inverse.
getU in interface SVDecompositionResultpublic DoubleMatrix getUT()
$\mathbf{U}$ is an orthogonal matrix, i.e. its transpose is also its inverse.
getUT in interface SVDecompositionResultpublic DoubleMatrix getV()
$\mathbf{V}$ is an orthogonal matrix, i.e. its transpose is also its inverse.
getV in interface SVDecompositionResultpublic DoubleMatrix getVT()
$\mathbf{V}$ is an orthogonal matrix, i.e. its transpose is also its inverse.
getVT in interface SVDecompositionResultpublic DoubleArray solve(DoubleArray b)
solve in interface DecompositionResultb - the vector to calculate withpublic double[] solve(double[] b)
solve in interface DecompositionResultb - the vector to calculate withpublic DoubleMatrix solve(DoubleMatrix b)
solve in interface DecompositionResultb - the matrix to calculate withCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.