Package no.uib.cipr.matrix
Class SymmDenseEVD
- java.lang.Object
-
- no.uib.cipr.matrix.SymmDenseEVD
-
public class SymmDenseEVD extends java.lang.Object
Computes eigenvalues of symmetrical, dense matrices
-
-
Constructor Summary
Constructors Constructor Description SymmDenseEVD(int n, boolean upper)
Sets up an eigenvalue decomposition for symmetrical, dense matrices.SymmDenseEVD(int n, boolean upper, boolean vectors)
Sets up an eigenvalue decomposition for symmetrical, dense matrices.SymmDenseEVD(int n, boolean upper, boolean vectors, double abstol)
Sets up an eigenvalue decomposition for symmetrical, dense matricesSymmDenseEVD(int n, boolean upper, double abstol)
Sets up an eigenvalue decomposition for symmetrical, dense matrices.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SymmDenseEVD
factor(LowerSymmDenseMatrix A)
Computes the eigenvalue decomposition of the given matrixSymmDenseEVD
factor(UpperSymmDenseMatrix A)
Computes the eigenvalue decomposition of the given matrixstatic SymmDenseEVD
factorize(Matrix A)
Convenience method for computing the full eigenvalue decomposition of the given matrixdouble[]
getEigenvalues()
Gets the eigenvalues (stored in ascending order)DenseMatrix
getEigenvectors()
Gets the eigenvectors, if availableboolean
hasEigenvectors()
True if the eigenvectors have been computed
-
-
-
Constructor Detail
-
SymmDenseEVD
public SymmDenseEVD(int n, boolean upper)
Sets up an eigenvalue decomposition for symmetrical, dense matrices. Computes all eigenvalues and eigenvectors, and uses a low default tolerance criteria- 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
-
SymmDenseEVD
public SymmDenseEVD(int n, boolean upper, double abstol)
Sets up an eigenvalue decomposition for symmetrical, dense 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 insteadabstol
- Absolute tolerance criteria
-
SymmDenseEVD
public SymmDenseEVD(int n, boolean upper, boolean vectors)
Sets up an eigenvalue decomposition for symmetrical, dense matrices. Uses a low default tolerance criteria- 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
-
SymmDenseEVD
public SymmDenseEVD(int n, boolean upper, boolean vectors, double abstol)
Sets up an eigenvalue decomposition for symmetrical, dense 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 eigenvaluesabstol
- Absolute tolerance criteria
-
-
Method Detail
-
factorize
public static SymmDenseEVD factorize(Matrix A) throws NotConvergedException
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
public SymmDenseEVD factor(LowerSymmDenseMatrix A) throws NotConvergedException
Computes the eigenvalue decomposition of the given matrix- Parameters:
A
- Matrix to factorize. Overwritten on return- Returns:
- The current eigenvalue decomposition
- Throws:
NotConvergedException
-
factor
public SymmDenseEVD factor(UpperSymmDenseMatrix A) throws NotConvergedException
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
public DenseMatrix getEigenvectors()
Gets the eigenvectors, if available
-
hasEigenvectors
public boolean hasEigenvectors()
True if the eigenvectors have been computed
-
-