|
|
◆ zhsein()
| void zhsein |
( |
char |
side, |
|
|
char |
eigsrc, |
|
|
char |
initv, |
|
|
int |
select[], |
|
|
int |
n, |
|
|
int |
ldh, |
|
|
doublecomplex |
h[], |
|
|
doublecomplex |
w[], |
|
|
int |
ldvl, |
|
|
doublecomplex |
vl[], |
|
|
int |
ldvr, |
|
|
doublecomplex |
vr[], |
|
|
int |
mm, |
|
|
int * |
m, |
|
|
doublecomplex |
work[], |
|
|
double |
rwork[], |
|
|
int |
ifaill[], |
|
|
int |
ifailr[], |
|
|
int * |
info |
|
) |
| |
Eigenvectors of complex Hessenberg matrix by inverse iteration method
- Purpose
- This routine uses inverse iteration to find specified right and/or left eigenvectors of a complex upper Hessenberg matrix H.
The right eigenvector x and the left eigenvector y of the matrix H corresponding to an eigenvalue w are defined by: H * x = w * x, y^H * H = w * y^H
where y^H denotes the conjugate transpose of the vector y.
- Parameters
-
| [in] | side | = 'R': Compute right eigenvectors only.
= 'L': Compute left eigenvectors only.
= 'B': Compute both right and left eigenvectors. |
| [in] | eigsrc | Specifies the source of eigenvalues supplied in w[].
= 'Q': The eigenvalues were found using zhseqr; thus, if H has zero subdiagonal elements, and so is block-triangular, then the j-th eigenvalue can be assumed to be an eigenvalue of the block containing the j-th row/column. This property allows this routine to perform inverse iteration on just one diagonal block.
= 'N': No assumptions are made on the correspondence between eigenvalues and diagonal blocks. In this case, this routine must always perform inverse iteration using the whole matrix H. |
| [in] | initv | = 'N': No initial vectors are supplied;
= 'U': User-supplied initial vectors are stored in the arrays vl and/or vr. |
| [in] | select[] | Array select[lselect][ldselect] (lselect >= n)
Specifies the eigenvectors to be computed. To select the eigenvector corresponding to the eigenvalue w[j], select[j] must be set to true. |
| [in] | n | Order of the matrix H. (n >= 0) (If n = 0, returns without computation) |
| [in] | ldh | Leading dimension of the two dimensional array h[][]. (ldh >= max(1, n)) |
| [in] | h[][] | Array h[lh][ldh] (lh >= n)
The upper Hessenberg matrix H.
If a NaN is detected in H, the routine will return with info = -7. |
| [in] | w[] | Array w[lw] (lw >= n)
[in] The eigenvalues of H.
[out] The real parts of w[] may have been altered since close eigenvalues are perturbed slightly in searching for independent eigenvectors. |
| [in] | ldvl | Leading dimension of the two dimensional array vl[][]. (ldvl >= 1 if side = 'R', ldvl >= max(1, n) if side = 'L' or 'B') |
| [in,out] | vl[][] | Array vl[lvl][ldvl] (lvl >= mm)
[in] If initv = 'U' and side = 'L' or 'B', vl[][] must contain starting vectors for the inverse iteration for the left eigenvectors. The starting vector for each eigenvector must be in the same row(s) in which the eigenvector will be stored.
[out] If side = 'L' or 'B', the left eigenvectors specified by select[] will be stored consecutively in the rows of vl[][], in the same order as their eigenvalues.
If side = 'R', vl[][] is not referenced. |
| [in] | ldvr | Leading dimension of the two dimensional array vr[][]. (ldvr >= 1 if side = 'L', ldvr >= max(1, n) if side = 'R' or 'B') |
| [in,out] | vr[][] | Array vr[lvr][ldvr] (lvr >= mm)
[in] If initv = 'U' and side = 'R' or 'B', vr[][] must contain starting vectors for the inverse iteration for the right eigenvectors. The starting vector for each eigenvector must be in the same row(s) in which the eigenvector will be stored.
[out] If side = 'R' or 'B', the right eigenvectors specified by select[] will be stored consecutively in the rows of vr[][], in the same order as their eigenvalues.
If side = 'L', vr[][] is not referenced. |
| [in] | mm | The number of elements in the arrays vl[][] and/or vr[][]. (mm >= m) |
| [out] | m | The number of rows in the arrays vl[][] and/or vr[][] required to store the eigenvectors (= the number of true elements in select[]). |
| [out] | work[] | Array work[lwork] (lwork >= n*n)
Complex work array. |
| [out] | rwork[] | Array rwork[lrwork] (lrwork >= n)
Work array. |
| [out] | ifaill[] | Array ifaill[lifaill] (lifaill >= mm)
If side = 'L' or 'B', ifaill[i] = j > 0 if the left eigenvector in the i-th row of vl[][] (corresponding to the eigenvalue w[j]) failed to converge. ifaill[i] = 0 if the eigenvector converged satisfactorily.
If side = 'R', ifaill[][] is not referenced. |
| [out] | ifailr[] | Array ifailr[lifailr] (lifailr >= mm)
If side = 'R' or 'B', ifailr[i] = j > 0 if the right eigenvector in the i-th row of vr[][] (corresponding to the eigenvalue w[j]) failed to converge. ifailr[i] = 0 if the eigenvector converged satisfactorily.
If side = 'L', ifailr[][] is not referenced. |
| [out] | info | = 0: Successful exit
= -1: The argument side had an illegal value (side != 'R', 'L' nor 'B')
= -2: The argument eigsrc had an illegal value (eigsrc != 'Q' nor 'N')
= -3: The argument initv had an illegal value (initv != 'N' nor 'U')
= -5: The argument n had an illegal value (n < 0)
= -6: The argument ldh had an illegal value (ldh < max(1, n))
= -7: The argument h had an illegal value (NaN detected in h)
= -9: The argument ldvl had an illegal value (ldvl too small)
= -11: The argument ldvr had an illegal value (ldvr too small)
= -13: The argument mm had an illegal value (mm < m)
= i > 0: i is the number of eigenvectors which failed to converge. See ifaill[] and ifailr[] for further details. |
- Reference
- LAPACK
|