Package no.uib.cipr.matrix
Class EVD
- java.lang.Object
-
- no.uib.cipr.matrix.EVD
-
public class EVD extends java.lang.Object
Computes eigenvalue decompositions of general matrices
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description EVD
factor(DenseMatrix A)
Computes the eigenvalue decomposition of the given matrixstatic EVD
factorize(Matrix A)
Convenience method for computing the complete eigenvalue decomposition of the given matrixdouble[]
getImaginaryEigenvalues()
Gets the imaginary part of the eigenvaluesDenseMatrix
getLeftEigenvectors()
Gets the left eigenvectors, if availabledouble[]
getRealEigenvalues()
Gets the real part of the eigenvaluesDenseMatrix
getRightEigenvectors()
Gets the right eigenvectors, if availableboolean
hasLeftEigenvectors()
True if the left eigenvectors have been computedboolean
hasRightEigenvectors()
True if the right eigenvectors have been computed
-
-
-
Constructor Detail
-
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 Detail
-
factorize
public static EVD factorize(Matrix A) throws NotConvergedException
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
public EVD factor(DenseMatrix A) throws NotConvergedException
Computes the eigenvalue decomposition of the given matrix- Parameters:
A
- Matrix to factorize. Overwritten on return- Returns:
- The current decomposition
- Throws:
NotConvergedException
-
getLeftEigenvectors
public DenseMatrix getLeftEigenvectors()
Gets the left eigenvectors, if available
-
getRightEigenvectors
public DenseMatrix 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
-
-