org.apache.commons.math.linear
private static class EigenDecompositionImpl.Solver extends 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 |
EigenDecompositionImpl.Solver(double[] realEigenvalues,
double[] imagEigenvalues,
ArrayRealVector[] eigenvectors)
Build a solver from decomposed matrix.
|
Modifier and Type | Method and Description |
---|---|
RealMatrix |
getInverse()
Get the 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 for symmetric matrices A.
|
RealMatrix |
solve(RealMatrix b)
Solve the linear equation A × X = B for symmetric matrices A.
|
RealVector |
solve(RealVector b)
Solve the linear equation A × X = B for symmetric matrices A.
|
private double[] realEigenvalues
private double[] imagEigenvalues
private final ArrayRealVector[] eigenvectors
private EigenDecompositionImpl.Solver(double[] realEigenvalues, double[] imagEigenvalues, ArrayRealVector[] eigenvectors)
realEigenvalues
- real parts of the eigenvaluesimagEigenvalues
- imaginary parts of the eigenvalueseigenvectors
- eigenvectorspublic double[] solve(double[] b) throws IllegalArgumentException, InvalidMatrixException
This method only find 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 = BIllegalArgumentException
- if matrices dimensions don't matchInvalidMatrixException
- if decomposed matrix is singularpublic RealVector solve(RealVector b) throws IllegalArgumentException, InvalidMatrixException
This method only find 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 = BIllegalArgumentException
- if matrices dimensions don't matchInvalidMatrixException
- if decomposed matrix is singularpublic RealMatrix solve(RealMatrix b) throws IllegalArgumentException, InvalidMatrixException
This method only find 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 = BIllegalArgumentException
- if matrices dimensions don't matchInvalidMatrixException
- if decomposed matrix is singularpublic boolean isNonSingular()
isNonSingular
in interface DecompositionSolver
public RealMatrix getInverse() throws InvalidMatrixException
getInverse
in interface DecompositionSolver
InvalidMatrixException
- if decomposed matrix is singularCopyright (c) 2003-2014 Apache Software Foundation