public class QRAlgorithm 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 upper Hessenberg form: A_{0} = QAQ' as in the
explicit version;
then, at each step, the first column of
A_{k} is transformed via a smallsize Householder similarity transformation to the
first column of p(A_{k})e_{1},
where p(A_{k}), of degree r, is the polynomial that defines the shifting
strategy.
Then successive Householder transformation of size r+1 are performed in order to return
the working matrix A_{k} to the upper Hessenberg 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 subdiagonal entries of A_{k} is
sufficiently small.
No QR decomposition is explicitly performed. Instead, we use the Francis algorithm
(FrancisQRStep
), as described in Golub and Van Loan.
Constructor and Description 

QRAlgorithm(Matrix A)
Runs the QR algorithm on a square matrix.

QRAlgorithm(Matrix A,
double epsilon)
Runs the QR algorithm on a square matrix.

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

Modifier and Type  Method and Description 

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

List<Vector> 
getEigenVectors() 
Matrix 
Q()
Gets the Q matrix as in the real Schur canonical form Q'AQ = T.

List<Matrix> 
Qs()
Gets the list of Q_{i}'s produced in the process of the QR
algorithm (if
keepQs is set to true ). 
Matrix 
T() 
public QRAlgorithm(Matrix A)
A
 a matrixIllegalArgumentException
 if A is not squarepublic QRAlgorithm(Matrix A, double epsilon)
A
 a square matrixepsilon
 a precision parameter: when a number x ≤ ε, it is
considered 0public QRAlgorithm(Matrix A, double epsilon, int maxIterations)
A
 a square matrixepsilon
 a precision parameter: when a number x ≤ ε, it is
considered 0maxIterations
 the maximum number of iterationsIllegalArgumentException
 if A is not squarepublic List<Number> getEigenvalues()
This implementation is a modified version of the algorithm in the reference.
getEigenvalues
in interface Spectrum
public List<Matrix> Qs()
keepQs
is set to true
).public Matrix Q()
This implementation stores all the Q_{i}'s produced in the process of the QR algorithm. Q is a product of them. That is, \[ Q = (Q_1 \times ... \times Q_n) \]
public Matrix T()
Copyright © 20102016 Numerical Method Incorporation Limited. All Rights Reserved.