Package no.uib.cipr.matrix
Class EVD
java.lang.Object
no.uib.cipr.matrix.EVD
Computes eigenvalue decompositions of general matrices
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionComputes the eigenvalue decomposition of the given matrixstatic EVD
Convenience method for computing the complete eigenvalue decomposition of the given matrixdouble[]
Gets the imaginary part of the eigenvaluesGets the left eigenvectors, if availabledouble[]
Gets the real part of the eigenvaluesGets the right eigenvectors, if availableboolean
True if the left eigenvectors have been computedboolean
True if the right eigenvectors have been computed
-
Constructor Details
-
EVD
public EVD(int n) Creates an empty eigenvalue decomposition which will compute all the eigenvalues and eigenvectors (left and right)- Parameters:
n
- Size of the matrix
-
EVD
public EVD(int n, boolean left, boolean right) Creates an empty eigenvalue decomposition- Parameters:
n
- Size of the matrixleft
- Whether to compute the left eigenvectors or notright
- Whether to compute the right eigenvectors or not
-
-
Method Details
-
factorize
Convenience method for computing the complete eigenvalue decomposition of the given matrix- Parameters:
A
- Matrix to factorize. Not modified- Returns:
- Newly allocated decomposition
- Throws:
NotConvergedException
-
factor
Computes the eigenvalue decomposition of the given matrix- Parameters:
A
- Matrix to factorize. Overwritten on return- Returns:
- The current decomposition
- Throws:
NotConvergedException
-
getLeftEigenvectors
Gets the left eigenvectors, if available -
getRightEigenvectors
Gets the right eigenvectors, if available -
getRealEigenvalues
public double[] getRealEigenvalues()Gets the real part of the eigenvalues -
getImaginaryEigenvalues
public double[] getImaginaryEigenvalues()Gets the imaginary part of the eigenvalues -
hasLeftEigenvectors
public boolean hasLeftEigenvectors()True if the left eigenvectors have been computed -
hasRightEigenvectors
public boolean hasRightEigenvectors()True if the right eigenvectors have been computed
-