private static class EigenDecomposition.Solver extends java.lang.Object implements DecompositionSolver
| Modifier and Type | Field and Description |
|---|---|
private ArrayRealVector[] |
eigenvectors
Eigenvectors.
|
private double[] |
imagEigenvalues
Imaginary part of the realEigenvalues.
|
private double[] |
realEigenvalues
Real part of the realEigenvalues.
|
| Modifier | Constructor and Description |
|---|---|
private |
EigenDecomposition.Solver(double[] realEigenvalues,
double[] imagEigenvalues,
ArrayRealVector[] eigenvectors)
Builds a solver from decomposed matrix.
|
| Modifier and Type | Method and Description |
|---|---|
private double |
eigenvalueNorm(int i) |
RealMatrix |
getInverse()
Get the inverse of the decomposed matrix.
|
boolean |
isNonSingular()
Checks whether the decomposed matrix is non-singular.
|
RealMatrix |
solve(RealMatrix b)
Solve the linear equation A × X = B for matrices A.
|
RealVector |
solve(RealVector b)
Solves the linear equation A × X = B for symmetric matrices A.
|
private double[] realEigenvalues
private double[] imagEigenvalues
private final ArrayRealVector[] eigenvectors
private EigenDecomposition.Solver(double[] realEigenvalues,
double[] imagEigenvalues,
ArrayRealVector[] eigenvectors)
realEigenvalues - Real parts of the eigenvalues.imagEigenvalues - Imaginary parts of the eigenvalues.eigenvectors - Eigenvectors.public RealVector solve(RealVector b)
This method only finds exact linear solutions, i.e. solutions for which ||A × X - B|| is exactly 0.
solve in interface DecompositionSolverb - Right-hand side of the equation A × X = B.DimensionMismatchException - if the matrices dimensions do not match.SingularMatrixException - if the decomposed matrix is singular.public RealMatrix solve(RealMatrix b)
The A matrix is implicit, it is provided by the underlying decomposition algorithm.
solve in interface DecompositionSolverb - right-hand side of the equation A × X = Bpublic boolean isNonSingular()
isNonSingular in interface DecompositionSolverprivate double eigenvalueNorm(int i)
i - which eigenvalue to find the norm ofpublic RealMatrix getInverse()
getInverse in interface DecompositionSolverSingularMatrixException - if the decomposed matrix is singular.Copyright (c) 2003-2015 Apache Software Foundation