public class SymmetricQRAlgorithm extends Object implements Spectrum
This implementation is the implicit doubleshift version. It makes the use of multiple shifts easier to introduce. The matrix is first brought to the tridiagonal form: A_{0} = Q_{0}'AQ_{0} as in the explicit version; then, at each step, the element at 1st column, 2nd row of \(A_k\mu I\) is zeroed out via a smallsize Givens rotation. where \(\mu\) is the shift. Then successive Givens rotations are performed in order to return the working matrix A_{k} to the tridiagonal form. This operation is known as bulge chasing, due to the peculiar shape of the nonzero entries of the matrix along the steps of the algorithm. Deflation is performed as soon as one of the offdiagonal entries of A_{k} is sufficiently small. No QR decomposition is explicitly performed. Instead, we use the Implicit Symmetric QR Step with Wilkinson Shift, as described in Golub and Van Loan.
Constructor and Description 

SymmetricQRAlgorithm(Matrix A)
Runs the QR algorithm on a symmetric matrix.

SymmetricQRAlgorithm(Matrix A,
double epsilon)
Runs the QR algorithm on a symmetric matrix.

SymmetricQRAlgorithm(Matrix A,
double epsilon,
int maxIterations)
Runs the QR algorithm on a symmetric matrix.

Modifier and Type  Method and Description 

Matrix 
D()
Gets the D matrix as in the real Schur canonical form Q'AQ = D.

List<Double> 
getEigenvalues()
Get all the eigenvalues.

List<Vector> 
getEigenvectors()
Gets the eigenvectors of A, which are the columns of Q.

List<GivensMatrix> 
Gs()
Gets the list of G_{k}'s produced in the process of diagonalizing the
tridiagonal matrix.

Matrix 
Q()
Gets the Q matrix as in Q'AQ = D, where D is diagonal and Q is
orthogonal.

public SymmetricQRAlgorithm(Matrix A)
A
 a symmetric matrixIllegalArgumentException
 if A is not symmetricpublic SymmetricQRAlgorithm(Matrix A, double epsilon)
A
 a symmetric matrixepsilon
 a precision parameter: when a number x ≤ ε, it is
considered 0public SymmetricQRAlgorithm(Matrix A, double epsilon, int maxIterations)
A
 a symmetric matrixepsilon
 a precision parameter: when a number x ≤ ε, it is
considered 0maxIterations
 the maximum number of iterationsIllegalArgumentException
 if A is not symmetricpublic List<Double> getEigenvalues()
Given a tridiagonal matrix, T, \[ \begin{bmatrix} a_{1} & b_{2} & 0 & 0\\ b_{2} & a_{2} & b_{3}& 0\\ 0 & b_{3} & a_{3}& b_{4}\\ 0 & 0 & b_{4}& a_{4} \end{bmatrix} \] the real Schur canonical form is Q'TQ = D, where Q is orthogonal, and D is diagonal.
This implementation is a modified version of the algorithm in the reference.
getEigenvalues
in interface Spectrum
public List<GivensMatrix> Gs()
public Matrix Q()
This implementation stores all the Givens matrix G_{k}'s produced in the process of diagonalizing the tridiagonal matrix. Q is a product of them and the rotation matrix,Q_{0} which tridiagonalizes A. That is, \[ Q = (Q_0\timesG_1 \times ... \times G_n) \]
public Matrix D()
public List<Vector> getEigenvectors()
getEigenvalues()
.Copyright © 20102016 Numerical Method Incorporation Limited. All Rights Reserved.