|
|
◆ ztrevc3()
| void ztrevc3 |
( |
char |
side, |
|
|
char |
howmny, |
|
|
int |
select[], |
|
|
int |
n, |
|
|
int |
ldt, |
|
|
doublecomplex |
t[], |
|
|
int |
ldvl, |
|
|
doublecomplex |
vl[], |
|
|
int |
ldvr, |
|
|
doublecomplex |
vr[], |
|
|
int |
mm, |
|
|
int * |
m, |
|
|
doublecomplex |
work[], |
|
|
int |
lwork, |
|
|
double |
rwork[], |
|
|
int |
lrwork, |
|
|
int * |
info |
|
) |
| |
Eigenvectors of complex triangular matrix of Schur factorization
- Purpose
- This routine computes some or all of the right and/or left eigenvectors of a complex upper triangular matrix T. Matrices of this type are produced by the Schur factorization of a complex general matrix: A = Q*T*Q^H, as computed by zhseqr.
The right eigenvector x and the left eigenvector y of T corresponding to an eigenvalue w are defined by: T*x = w*x, (y^H)*T = w*(y^H)
where y^H denotes the conjugate transpose of the vector y. The eigenvalues are not input to this routine, but are read directly from the diagonal blocks of T.
This routine returns the matrices X and/or Y of right and left eigenvectors of T, or the products Q*X and/or Q*Y, where Q is an input matrix. If Q is the unitary factor that reduces a matrix A to Schur form T, then Q*X and Q*Y are the matrices of right and left eigenvectors of A.
This uses a Level 3 BLAS version of the back transformation.
- Parameters
-
| [in] | side | = 'R': Compute right eigenvectors only.
= 'L': Compute left eigenvectors only.
= 'B': Compute both right and left eigenvectors. |
| [in] | howmny | = 'A': Compute all right and/or left eigenvectors.
= 'B': Compute all right and/or left eigenvectors, backtransformed by the matrices in vr and/or vl.
= 'S': Compute selected right and/or left eigenvectors, as indicated by the logical array select. |
| [in,out] | select[] | Array select[lselect][ldselect] (lselect >= n)
If howmny = 'S', select specifies the eigenvectors to be computed. The eigenvector corresponding to the j-th eigenvalue is computed if select[j] = true.
Not referenced if howmny = 'A' or 'B'. |
| [in] | n | Order of the matrix A. (n >= 0) (If n = 0, returns without computation) |
| [in] | ldt | Leading dimension of the two dimensional array t[][]. (ldt >= max(1, n)) |
| [in,out] | t[][] | Array t[lt][ldt] (lt >= n)
The upper triangular matrix T. t[][] is modified, but restored on exit. |
| [in] | ldvl | Leading dimension of the two dimensional array vl[][]. (ldvl >= 1 if side = 'R', ldvl >= n if side = 'L' or 'B') |
| [in,out] | vl[][] | Array vl[lvl][ldvl] (lvl >= mm)
[in] If side = 'L' or 'B' and howmny = 'B', vl[][] must contain an n x n matrix Q (usually the unitary matrix Q of Schur vectors returned by zhseqr).
[out] If side = 'L' or 'B', vl[][] contains:
if howmny = 'A', the matrix Y of left eigenvectors of T;
if howmny = 'B', the matrix Q*Y;
if howmny = 'S', the left eigenvectors of T specified by select[], stored consecutively in the rows of vl, in the same order as their eigenvalues.
Not referenced if side = 'R'. |
| [in] | ldvr | Leading dimension of the two dimensional array vr[][]. (ldvr >= 1 if side = 'L', ldvr >= n if side = 'R' or 'B') |
| [in,out] | vr[][] | Array vr[lvr][ldvr] (lvr >= mm)
[in] If side = 'R' or 'B' and howmny = 'B', vr[][] must contain an n x n matrix Q (usually the unitary matrix Q of Schur vectors returned by zhseqr).
[out] If side = 'R' or 'B', vr[][] contains:
if howmny = 'A', the matrix X of right eigenvectors of T;
if howmny = 'B', the matrix Q*X;
if howmny = 'S', the right eigenvectors of T specified by select[], stored consecutively in the rows of vr, in the same order as their eigenvalues.
Not referenced if side = 'L'. |
| [in] | mm | The number of rows in the arrays vl and/or vr. (mm >= m) |
| [out] | m | The number of rows in the arrays vl and/or vr actually used to store the eigenvectors.
If howmny = 'A' or 'B', m is set to n.
Each selected eigenvector occupies one row. |
| [out] | work[] | Array work[lwork]
Complex work array.
On exit, if info = 0, work[0] returns the optimal lwork. |
| [in] | lwork | The dimension of the array work[]. (lwork >= max(1, 2*n))
For optimum performance, lwork >= n + 2*n*nb, where nb is the optimal blocksize.
If lwork = -1, then a workspace query is assumed. The routine only calculates the optimal size of the work[] array, and returns the value in work[0]. |
| [out] | rwork[] | Array rwork[lrwork]
Work array. On exit, if info = 0, rwork[0] returns the optimal lwork. |
| [in] | lrwork | The size of rwork[]. (lrwork >= max(1, n))
If lrwork = -1, then a workspace query is assumed. The routine only calculates the optimal sizes of the rwork[] array, and returns this value in rwork[0]. |
| [out] | info | = 0: Successful exit
= -1: The argument side had an illegal value (side != 'R', 'L' nor 'B')
= -2: The argument howmny had an illegal value (hownmy != 'A', 'B' nor 'S')
= -4: The argument n had an illegal value (n < 0)
= -5: The argument ldt had an illegal value (ldt < max(1, n))
= -7: The argument ldvl had an illegal value (ldvl too small)
= -9: The argument ldvr had an illegal value (ldvr too small)
= -11: The argument mm had an illegal value (mm < m)
= -14: The argument lwork had an illegal value (lwork too small)
= -18: The argument lrwork had an illegal value (lrwork too small) |
- Further Details
- The algorithm used in this program is basically backward (forward) substitution, with scaling to make the the code robust against possible overflow.
Each eigenvector is normalized so that the element of largest magnitude has magnitude 1; here the magnitude of a complex number (x,y) is taken to be |x| + |y|.
- Reference
- LAPACK
|