mikera.matrixx.decompose.impl.eigen
Class SymmetricQRAlgorithmDecomposition
- java.lang.Object
-
- mikera.matrixx.decompose.impl.eigen.SymmetricQRAlgorithmDecomposition
-
public class SymmetricQRAlgorithmDecomposition extends java.lang.ObjectComputes 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
-
-
Constructor Summary
Constructors Constructor and Description SymmetricQRAlgorithmDecomposition(boolean computeVectors)SymmetricQRAlgorithmDecomposition(TridiagonalDecompositionHouseholder decomp, boolean computeVectors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description EigenResultdecompose(AMatrix orig)Decomposes the matrix using the QR algorithm.Vector2getEigenvalue(int index)AVectorgetEigenVector(int index)intgetNumberOfEigenvalues()voidsetComputeVectorsWithValues(boolean computeVectorsWithValues)voidsetMaxIterations(int max)Used to limit the number of internal QR iterations that the QR algorithm performs.
-
-
-
Constructor Detail
-
SymmetricQRAlgorithmDecomposition
public SymmetricQRAlgorithmDecomposition(TridiagonalDecompositionHouseholder decomp, boolean computeVectors)
-
SymmetricQRAlgorithmDecomposition
public SymmetricQRAlgorithmDecomposition(boolean computeVectors)
-
-
Method Detail
-
setComputeVectorsWithValues
public void setComputeVectorsWithValues(boolean computeVectorsWithValues)
-
setMaxIterations
public void setMaxIterations(int max)
Used to limit the number of internal QR iterations that the QR algorithm performs. 20 should be enough for most applications.- Parameters:
max- The maximum number of QR iterations it will perform.
-
getNumberOfEigenvalues
public int getNumberOfEigenvalues()
-
getEigenvalue
public Vector2 getEigenvalue(int index)
-
getEigenVector
public AVector getEigenVector(int index)
-
decompose
public EigenResult decompose(AMatrix orig)
Decomposes the matrix using the QR algorithm. Care was taken to minimize unnecessary memory copying and cache skipping.- Parameters:
orig- The matrix which is being decomposed. Not modified.- Returns:
- true if it decomposed the matrix or false if an error was detected. This will not catch all errors.
-
-
DMelt 3.0 © DataMelt by jWork.ORG