- All Known Implementing Classes:
EigenDecompositionApache,EigenDecompositionJama,Eigensolver2x2,GeneralizedEigenDecomposition,GeneralizedSymmetricEigenDecomposition
public interface RealEigenDecomposition
Common interface for eigendecompositions capable of delivering solutions when all eigenvalues are real.
- Version:
- 2022/07/08
-
Method Summary
Modifier and TypeMethodDescriptiondefault RealMatrixgetD()Gets the block diagonal matrix D of the decomposition.getEigenvector(int k) Returns the k-th eigenvector, i.e., the k-th column vector of the matrix returned bygetV().doublegetRealEigenvalue(int k) Returns the real part of the k-th eigenvaluedouble[]Returns a vector holding the real parts of the eigenvaluesgetV()Return the matrix of eigenvectors, which are its column vectors.booleanReturns whether the calculated eigenvalues are complex or real.
-
Method Details
-
hasComplexEigenvalues
boolean hasComplexEigenvalues()Returns whether the calculated eigenvalues are complex or real.- Returns:
trueif any of the eigenvalues is complex,falseotherwise
-
getRealEigenvalue
Returns the real part of the k-th eigenvalue- Parameters:
k- index of the eigenvalue @param k index of the eigenvector (0-based)- Returns:
- real part of the k-th eigenvalue
-
getRealEigenvalues
double[] getRealEigenvalues()Returns a vector holding the real parts of the eigenvalues- Returns:
- real(diag(D))
-
getEigenvector
Returns the k-th eigenvector, i.e., the k-th column vector of the matrix returned bygetV().- Parameters:
k- index of the eigenvector (0-based)- Returns:
- the k-th eigenvector (instance of
RealVector)
-
getV
Return the matrix of eigenvectors, which are its column vectors.- Returns:
- the matrix of eigenvectors
-
getD
Gets the block diagonal matrix D of the decomposition. Real eigenvalues are on the diagonal while complex values are on 2x2 blocks {{real_pos imaginary}, {neg_imaginary, real}}.- Returns:
- matrix D
-