public class SymmetricQRAlgorithmDecomposition extends Object implements EigenDecomposition<DenseMatrix64F>
Computes the eigenvalues and eigenvectors of a real symmetric matrix using the symmetric implicit QR algorithm. Inside each iteration a QR decomposition of Ai-piI is implicitly computed.
This implementation is based on the algorithm is sketched out in:
David S. Watkins, "Fundamentals of Matrix Computations," Second Edition. page 377-385
SymmetricQrAlgorithm,
TridiagonalDecompositionHouseholder| Constructor and Description |
|---|
SymmetricQRAlgorithmDecomposition(boolean computeVectors) |
SymmetricQRAlgorithmDecomposition(TridiagonalSimilarDecomposition<DenseMatrix64F> decomp,
boolean computeVectors) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
decompose(DenseMatrix64F orig)
Decomposes the matrix using the QR algorithm.
|
Complex64F |
getEigenvalue(int index)
Returns an eigenvalue as a complex number.
|
DenseMatrix64F |
getEigenVector(int index)
Used to retrieve real valued eigenvectors.
|
int |
getNumberOfEigenvalues()
Returns the number of eigenvalues/eigenvectors.
|
boolean |
inputModified()
Is the input matrix to
DecompositionInterface.decompose(org.ejml.data.Matrix64F) is modified during
the decomposition process. |
void |
setComputeVectorsWithValues(boolean computeVectorsWithValues) |
void |
setMaxIterations(int max)
Used to limit the number of internal QR iterations that the QR algorithm performs.
|
public SymmetricQRAlgorithmDecomposition(TridiagonalSimilarDecomposition<DenseMatrix64F> decomp, boolean computeVectors)
public SymmetricQRAlgorithmDecomposition(boolean computeVectors)
public void setComputeVectorsWithValues(boolean computeVectorsWithValues)
public void setMaxIterations(int max)
max - The maximum number of QR iterations it will perform.public int getNumberOfEigenvalues()
EigenDecompositiongetNumberOfEigenvalues in interface EigenDecomposition<DenseMatrix64F>public Complex64F getEigenvalue(int index)
EigenDecompositionReturns an eigenvalue as a complex number. For symmetric matrices the returned eigenvalue will always be a real number, which means the imaginary component will be equal to zero.
NOTE: The order of the eigenvalues is dependent upon the decomposition algorithm used. This means that they may or may not be ordered by magnitude. For example the QR algorithm will returns results that are partially ordered by magnitude, but this behavior should not be relied upon.
getEigenvalue in interface EigenDecomposition<DenseMatrix64F>index - Index of the eigenvalue eigenvector pair.public DenseMatrix64F getEigenVector(int index)
EigenDecompositionUsed to retrieve real valued eigenvectors. If an eigenvector is associated with a complex eigenvalue then null is returned instead.
getEigenVector in interface EigenDecomposition<DenseMatrix64F>index - Index of the eigenvalue eigenvector pair.public boolean decompose(DenseMatrix64F orig)
decompose in interface DecompositionInterface<DenseMatrix64F>orig - The matrix which is being decomposed. Not modified.public boolean inputModified()
DecompositionInterfaceDecompositionInterface.decompose(org.ejml.data.Matrix64F) is modified during
the decomposition process.inputModified in interface DecompositionInterface<DenseMatrix64F>Copyright © 2013. All Rights Reserved.