Class SymmetricQrAlgorithm_DDRM
- java.lang.Object
-
- org.ejml.dense.row.decomposition.eig.symm.SymmetricQrAlgorithm_DDRM
-
public class SymmetricQrAlgorithm_DDRM extends java.lang.ObjectComputes the eigenvalues and eigenvectors of a symmetric tridiagonal matrix using the symmetric QR algorithm.
This implementation is based on the algorithm is sketched out in:
David S. Watkins, "Fundamentals of Matrix Computations," Second Edition. page 377-385
-
-
Constructor Summary
Constructors Constructor Description SymmetricQrAlgorithm_DDRM()Creates a new SymmetricQREigenvalue class that declares its own SymmetricQREigenHelper.SymmetricQrAlgorithm_DDRM(SymmetricQREigenHelper_DDRM helper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetEigenvalue(int index)Returns the eigenvalue at the specified index.intgetNumberOfEigenvalues()Returns the number of eigenvalues available.org.ejml.data.DMatrixRMajgetQ()voidperformStep()First looks for zeros and then performs the implicit single step in the QR Algorithm.booleanprocess(int sideLength, double[] diag, double[] off)booleanprocess(int sideLength, double[] diag, double[] off, double[] eigenvalues)Computes the eigenvalue of the provided tridiagonal matrix.voidsetFastEigenvalues(boolean fastEigenvalues)voidsetMaxIterations(int maxIterations)voidsetQ(org.ejml.data.DMatrixRMaj q)
-
-
-
Constructor Detail
-
SymmetricQrAlgorithm_DDRM
public SymmetricQrAlgorithm_DDRM(SymmetricQREigenHelper_DDRM helper)
-
SymmetricQrAlgorithm_DDRM
public SymmetricQrAlgorithm_DDRM()
Creates a new SymmetricQREigenvalue class that declares its own SymmetricQREigenHelper.
-
-
Method Detail
-
setMaxIterations
public void setMaxIterations(int maxIterations)
-
getQ
public org.ejml.data.DMatrixRMaj getQ()
-
setQ
public void setQ(org.ejml.data.DMatrixRMaj q)
-
setFastEigenvalues
public void setFastEigenvalues(boolean fastEigenvalues)
-
getEigenvalue
public double getEigenvalue(int index)
Returns the eigenvalue at the specified index.- Parameters:
index- Which eigenvalue.- Returns:
- The eigenvalue.
-
getNumberOfEigenvalues
public int getNumberOfEigenvalues()
Returns the number of eigenvalues available.- Returns:
- How many eigenvalues there are.
-
process
public boolean process(int sideLength, double[] diag, double[] off, double[] eigenvalues)Computes the eigenvalue of the provided tridiagonal matrix. Note that only the upper portion needs to be tridiagonal. The bottom diagonal is assumed to be the same as the top.- Parameters:
sideLength- Number of rows and columns in the input matrix.diag- Diagonal elements from tridiagonal matrix. Modified.off- Off diagonal elements from tridiagonal matrix. Modified.- Returns:
- true if it succeeds and false if it fails.
-
process
public boolean process(int sideLength, double[] diag, double[] off)
-
performStep
public void performStep()
First looks for zeros and then performs the implicit single step in the QR Algorithm.
-
-