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 |
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 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 DecompositionSolver
b
- 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 DecompositionSolver
b
- right-hand side of the equation A × X = Bpublic boolean isNonSingular()
isNonSingular
in interface DecompositionSolver
private double eigenvalueNorm(int i)
i
- which eigenvalue to find the norm ofpublic RealMatrix getInverse()
getInverse
in interface DecompositionSolver
SingularMatrixException
- if the decomposed matrix is singular.