Package no.uib.cipr.matrix
Class SymmPackEVD
java.lang.Object
no.uib.cipr.matrix.SymmPackEVD
Computes eigenvalues of symmetrical, packed matrices
-
Constructor Summary
ConstructorsConstructorDescriptionSymmPackEVD
(int n, boolean upper) Sets up an eigenvalue decomposition for symmetrical, packed matrices.SymmPackEVD
(int n, boolean upper, boolean vectors) Sets up an eigenvalue decomposition for symmetrical, packed matrices -
Method Summary
Modifier and TypeMethodDescriptionComputes the eigenvalue decomposition of the given matrixComputes the eigenvalue decomposition of the given matrixstatic SymmPackEVD
Convenience method for computing the full eigenvalue decomposition of the given matrixdouble[]
Gets the eigenvalues (stored in ascending order)Gets the eigenvectors, if availableboolean
True if the eigenvectors have been computed
-
Constructor Details
-
SymmPackEVD
public SymmPackEVD(int n, boolean upper) Sets up an eigenvalue decomposition for symmetrical, packed matrices. Computes all eigenvalues and eigenvectors- Parameters:
n
- Size of the matrixupper
- True if the upper part of the matrix is stored, and false if the lower part of the matrix is stored instead
-
SymmPackEVD
public SymmPackEVD(int n, boolean upper, boolean vectors) Sets up an eigenvalue decomposition for symmetrical, packed matrices- Parameters:
n
- Size of the matrixupper
- True if the upper part of the matrix is stored, and false if the lower part of the matrix is stored insteadvectors
- True to compute the eigenvectors, false for just the eigenvalues
-
-
Method Details
-
factorize
Convenience method for computing the full eigenvalue decomposition of the given matrix- Parameters:
A
- Matrix to factorize. Upper part extracted, and the matrix is 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 eigenvalue decomposition
- Throws:
NotConvergedException
-
factor
Computes the eigenvalue decomposition of the given matrix- Parameters:
A
- Matrix to factorize. Overwritten on return- Returns:
- The current eigenvalue decomposition
- Throws:
NotConvergedException
-
getEigenvalues
public double[] getEigenvalues()Gets the eigenvalues (stored in ascending order) -
getEigenvectors
Gets the eigenvectors, if available -
hasEigenvectors
public boolean hasEigenvectors()True if the eigenvectors have been computed
-