?trevc3
?trevc3
Computes selected eigenvectors of an upper (quasi-) triangular matrix computed by
?hseqr
using Level 3 BLASSyntax
call
strevc3
(
side
,
howmny
,
select
,
n
,
t
,
ldt
,
vl
,
ldvl
,
vr
,
ldvr
,
mm
,
m
,
work
,
lwork
,
info
)
call
dtrevc3
(
side
,
howmny
,
select
,
n
,
t
,
ldt
,
vl
,
ldvl
,
vr
,
ldvr
,
mm
,
m
,
work
,
lwork
,
info
)
call
ctrevc3
(
side
,
howmny
,
select
,
n
,
t
,
ldt
,
vl
,
ldvl
,
vr
,
ldvr
,
mm
,
m
,
work
,
lwork
,
rwork
,
lrwork
,
info
)
call
ztrevc3
(
side
,
howmny
,
select
,
n
,
t
,
ldt
,
vl
,
ldvl
,
vr
,
ldvr
,
mm
,
m
,
work
,
lwork
,
rwork
,
lrwork
,
info
)
Include Files
- mkl.fi
Description
This routine computes some or all of the right and left eigenvectors of an upper triangular matrix
T
(or, for real flavors, an upper quasi-triangular matrix T
) using Level 3 BLAS. Matrices of this type are produced by the Schur factorization of a general matrix: A =Q*T*QH
, as computed by hseqr
.The right eigenvector
x
and the left eigenvector y
of T
corresponding to an eigenvalue w
are defined by the following:T*x = w*x, yH*T = w*yH
where y
H
denotes the conjugate transpose of y
.The eigenvalues are not passed to this routine but are read directly from the diagonal blocks of
T
.This routine returns one or both of the matrices
X
and Y
of the right and left eigenvectors of T
, or one or both of the products Q*X
and Q*Y
, where Q
is an input matrix.If
Q
is the orthogonal/unitary factor that reduces a matrix A
to Schur form T
, then Q*X
and Q*Y
are the matrices of the right and left eigenvectors of A
.Input Parameters
- side
- CHARACTER*1Must be'R','L', or'B'.
- Ifside='R', only right eigenvectors are computed.
- Ifside='L', only left eigenvectors are computed.
- Ifside='B', all eigenvectors are computed.
- howmny
- CHARACTER*1Must be'A','B', or'S'.
- Ifhowmny='A', all eigenvectors (as specified byside) are computed.
- Ifhowmny='B', all eigenvectors (as specified byside) are computed and back-transformed by the matrices supplied invlandvr.
- Ifhowmny='S', selected eigenvectors (as specified bysideandselect) are computed.
- select
- Array with a size of at leastmax (1, n)Ifhowmny='S',selectspecifies which eigenvectors are to be computed. Ifhowmny='A'orhowmny='B',selectis not referenced.For real flavors:
- Ifomega(j)is a real eigenvalue andselect(j)is.TRUE., the corresponding real eigenvector is computed.
- Ifomega(j)andomega(j + 1)are the real and imaginary parts of a complex eigenvalue and eitherselect(j)orselect(j + 1)is.TRUE., the corresponding complex eigenvector is computed, and on exitselect(j)is set to.TRUE.andselect(j + 1)is set to.FALSE..
For complex flavors:- Ifselect(j)is.TRUE., the eigenvector corresponding to thejtheigenvalue is computed.
- n
- INTEGERThe order of the matrixT (n≥ 0).
- t,vl,vr,work
- REALforstrevc3
- DOUBLE PRECISIONfordtrevc3
- COMPLEXforctrevc3
- DOUBLE COMPLEXforztrevc3
Arrays:- t(ldt,*)contains then-by-nmatrixTin Schur canonical form. For complex flavorsctrevc3andztrevc3, the array contains the upper triangular matrixT.The second dimension oftmust be at leastmax(1, n).
- vl(ldvl,*)Ifhowmny='B'andside='L'or'B', thenvlmust contain ann-by-nmatrixQ(usually the matrix of Schur vectors returned by?hseqr).Ifhowmny='A'or'S',vlneed not be set.The second dimension ofvlmust be at leastmax(1, mm)ifside='L'or'B', and at least1ifside='R'.The arrayvlis not referenced ifside='R'.
- vr(ldvr,*)Ifhowmny='B'andside='R'or'B',vrmust contain ann-by-nmatrixQ(usually the matrix of Schur vectors returned by?hseqr).Ifhowmny='A'or'S',vrneed not be set.The second dimension ofvrmust be at leastmax(1, mm)ifside='R'or'B', and at least1ifside='L'.The arrayvris not referenced ifside='L'.
- work(*)is a workspace array, and its dimension ismax (1, lwork).
- lwork
- INTEGERThe size of the work array. Must be at leastmax(1, 3*n)for real flavors, and at leastmax(1, 2*n)for complex flavors.Iflwork=-1, a workspace query is assumed; the routine calculates only the optimal size of the work array and returns this value as the first entry of the work array, and no error message related tolworkis issued by xerbla. For details, see "Application Notes" below.
- ldt
- INTEGERThe leading dimension oft. It is at leastmax(1, n).
- ldvl
- INTEGERThe leading dimension ofvl.
- Ifside='L'or'B',ldvl≥n.
- Ifside='R',ldvl≥ 1.
- ldvr
- INTEGERThe leading dimension ofvr.
- Ifside='R'or'B',ldvr≥n.
- Ifside='L',ldvr≥ 1.
- mm
- INTEGERThe number of columns in one or both of the arraysvlandvr. Must be at leastm(the precise number of columns required).
- Ifhowmny='A'or'B',mm = n.
- Ifhowmny='S': for real flavors,mmis obtained by counting 1 for each selected real eigenvector and 2 for each selected complex eigenvector; for complex flavors,mmis the number of selected eigenvectors (seeselect).
Constraint:0.≤mm≤n - rwork
- REALforctrevc3
- DOUBLE PRECISIONforztrevc3
The workspace array is used in complex flavors only. Its dimensionismax (1, lrwork).- lrwork
- INTEGERThe size of therworkarray. It must be at leastmax(1, n).Iflrwork=-1, a workspace query is assumed; the routine calculates only the optimal size of the work array and returns this value as the first entry of therworkarray, and no error message related tolrworkis issued by xerbla. For details, see "Application Notes" below.
Output Parameters
- select
- If a complex eigenvector of a real matrix was selected as specified above, thenselect(j)is set to.TRUE.andselect(j + 1)is set to.FALSE..
- t
- COMPLEXforctrevc3DOUBLE COMPLEXforztrevc3ctrevc3orztrevc3modifies thet(ldt,*)array, which is restored on exit.
- vl,vr
- Ifside='L'or'B',vlcontains the computed left eigenvectors (as specified byhowmnyandselect).Ifside='R'or'B',vrcontains the computed right eigenvectors (as specified byhowmnyandselect).Treated column-wise, the eigenvectors form a rectangularn-by-mmmatrix.A real eigenvector corresponding to a real eigenvalue occupies one column of the matrix; a complex eigenvector corresponding to a complex eigenvalue occupies two columns. The first column holds the real part of the eigenvector, and the second column holds the imaginary part of the eigenvector. The matrix is stored in a one-dimensional array as described bymatrix_layout(using either column major or row major layout).
- m
- INTEGERThe number of selected eigenvectors. Ifhowmny='A'or'B',mis set ton.The number of columns of one or both ofvlandvractually used to store the selected eigenvectors. Ifhowmny='A'or'B',mis set ton.
- work(1)
- On exit, ifinfo=0,work(1)returns the required optimal size oflwork.
- rwork(1)
- On exit, ifinfo=0, thenrwork(1)returns the required optimal size oflrwork.
- info
- INTEGERIfinfo=0, the execution is successful.Ifinfo=-, theiithparameter contained an illegal value.
Application Notes
If
xi
is an exact right eigenvector and yi
is the corresponding computed eigenvector, the angle θ(yi, xi)
between them is bounded as follows:θ(yi,xi)≤(c(n)ε||T||2)/sepi
where
sepi
is the reciprocal condition number of xi
. You can compute the condition number sepi
by calling ?trsna
.