|
|
◆ dhsein()
| void dhsein |
( |
char |
side, |
|
|
char |
eigsrc, |
|
|
char |
initv, |
|
|
int |
select[], |
|
|
int |
n, |
|
|
int |
ldh, |
|
|
double |
h[], |
|
|
double |
wr[], |
|
|
double |
wi[], |
|
|
int |
ldvl, |
|
|
double |
vl[], |
|
|
int |
ldvr, |
|
|
double |
vr[], |
|
|
int |
mm, |
|
|
int * |
m, |
|
|
double |
work[], |
|
|
int |
ifaill[], |
|
|
int |
ifailr[], |
|
|
int * |
info |
|
) |
| |
Eigenvectors of Hessenberg matrix by inverse iteration method
- Purpose
- This routine uses inverse iteration to find specified right and/or left eigenvectors of a real 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 (wr[], wi[]).
= 'Q': The eigenvalues were found using dhseqr; 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,out] | select[] | Array select[lselect] (lselect >= n)
[in] Specifies the eigenvectors to be computed. To select the real eigenvector corresponding to a real eigenvalue wr[j], select[j] must be set to true. To select the complex eigenvectors corresponding to a complex eigenvalue (wr[j], wi[j]), with complex conjugate (wr[j+1], wi[j+1]), either select[j] or select[j+1] or both must be set to true.
[out] If the complex eigenvectors corresponding to complex conjugate eigenvalues are selected, select[j] is set to true and select[j+1] is set to false. |
| [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,out] | wr[] | Array wr[lwr] (lwr >= n) |
| [in] | wi[] | Array wi[lwi] (lwi >= n)
[in] The real and imaginary parts of the eigenvalues of H. A complex conjugate pair of eigenvalues must be stored in consecutive elements of wr[] and wi[].
[out] wr[] 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. A complex eigenvector corresponding to a complex eigenvalue is stored in two consecutive rows, the first holding the real part and the second the imaginary part.
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. A complex eigenvector corresponding to a complex eigenvalue is stored in two consecutive rows, the first holding the real part and the second the imaginary part.
If side = 'L', vr[][] is not referenced. |
| [in] | mm | The number of columns 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. Each selected real eigenvector occupies one row and each selected complex eigenvector occupies two rows. |
| [out] | work[] | Array work[lwork] (lwork >= n*(n + 2))
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 the i-th and (i+1)th rows of vl[][] hold a complex eigenvector, then ifaill[i] and ifaill[i+1] are set to the same value.
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 the i-th and (i+1)th rows of vr[][] hold a complex eigenvector, then ifailr[i] and ifailr[i+1] are set to the same value.
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)
= -10: The argument ldvl had an illegal value (ldvl too small)
= -12: The argument ldvr had an illegal value (ldvr too small)
= -14: 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
|