private static class SingularValueDecompositionImpl.Solver extends java.lang.Object implements DecompositionSolver
| Modifier and Type | Field and Description |
|---|---|
private boolean |
nonSingular
Singularity indicator.
|
private RealMatrix |
pseudoInverse
Pseudo-inverse of the initial matrix.
|
| Modifier | Constructor and Description |
|---|---|
private |
SingularValueDecompositionImpl.Solver(double[] singularValues,
RealMatrix uT,
RealMatrix v,
boolean nonSingular)
Build a solver from decomposed matrix.
|
| Modifier and Type | Method and Description |
|---|---|
RealMatrix |
getInverse()
Get the pseudo-inverse of the decomposed matrix.
|
boolean |
isNonSingular()
Check if the decomposed matrix is non-singular.
|
double[] |
solve(double[] b)
Solve the linear equation A × X = B in least square sense.
|
RealMatrix |
solve(RealMatrix b)
Solve the linear equation A × X = B in least square sense.
|
RealVector |
solve(RealVector b)
Solve the linear equation A × X = B in least square sense.
|
private final RealMatrix pseudoInverse
private boolean nonSingular
private SingularValueDecompositionImpl.Solver(double[] singularValues,
RealMatrix uT,
RealMatrix v,
boolean nonSingular)
singularValues - singularValuesuT - UT matrix of the decompositionv - V matrix of the decompositionnonSingular - singularity indicatorpublic double[] solve(double[] b)
throws java.lang.IllegalArgumentException
The m×n matrix A may not be square, the solution X is such that ||A × X - B|| is minimal.
solve in interface DecompositionSolverb - right-hand side of the equation A × X = Bjava.lang.IllegalArgumentException - if matrices dimensions don't matchpublic RealVector solve(RealVector b) throws java.lang.IllegalArgumentException
The m×n matrix A may not be square, the solution X is such that ||A × X - B|| is minimal.
solve in interface DecompositionSolverb - right-hand side of the equation A × X = Bjava.lang.IllegalArgumentException - if matrices dimensions don't matchpublic RealMatrix solve(RealMatrix b) throws java.lang.IllegalArgumentException
The m×n matrix A may not be square, the solution X is such that ||A × X - B|| is minimal.
solve in interface DecompositionSolverb - right-hand side of the equation A × X = Bjava.lang.IllegalArgumentException - if matrices dimensions don't matchpublic boolean isNonSingular()
isNonSingular in interface DecompositionSolverpublic RealMatrix getInverse()
getInverse in interface DecompositionSolverCopyright (c) 2003-2013 Apache Software Foundation