|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.matrix.doubles.factorization.eigen.HessenbergDecomposition
public class HessenbergDecomposition
Given a square matrix A, we find Q such that
Q' %*% A %*% Q = H
where H is a Hessenberg matrix.
This implementation uses the Householder reflection process to repeatedly zero out the elements below the sub-diagonal.
For example, the first step is to left multiply A with the Householder matrix Q1 so that
matrix Q1 %*% A has zeros in the left column (except for the first two rows).
That is,
| a11 * ... * |
| a21 |
Q1 %*% A = Q1' %*% A = | 0 |
| . A' |
| . |
| 0 |
(Note that the Q's are Hermitian.)
Then, we right multiply A with Q1.
We have
| a11 # ... # |
| a21 |
Q1' %*% A %*% Q1 = | 0 |
| . A'' |
| . |
| 0 |
At the end,
(Qn' %*% ... %*% Q1') %*% A %*% (Q1 %*% ... %*% Qn) = H
where H is Hessenberg.
We have
Q = Q1 %*% ... %*% Qn
This transformation always succeeds.
| Constructor Summary | |
|---|---|
HessenbergDecomposition(Matrix A)
Construct an instance of the Hessenberg decomposition for a square matrix. |
|
| Method Summary | |
|---|---|
Matrix |
H()
Get a copy of the H matrix. |
Matrix |
Q()
Get a copy of the Q matrix, where
Q = Q1 %*% ... %*% Qn
where
n = dim - 2. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HessenbergDecomposition(Matrix A)
Note: this decomposition does not require a precision parameter, though checking the result will need an epsilon.
A - a square matrix
java.lang.IllegalArgumentException - if A is not squareHessenberg.isHessenberg(com.numericalmethod.suanshu.matrix.doubles.Matrix, double),
"Algorithm 7.4.2. Matrix Computations, 3rd edition. Golub G. H., van Loan C. F."| Method Detail |
|---|
public Matrix Q()
Q matrix, where
Q = Q1 %*% ... %*% Qn
where
n = dim - 2.
To compute Q,
instead of explicitly doing this multiplication, we can improve the performance
by applying Qi's repeatedly on an identity matrix.
Q matrix in the QR decompositionpublic Matrix H()
H matrix.
H
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||