?trevc
?trevc
Computes selected eigenvectors of an upper (quasi-) triangular matrix computed by
?hseqr
.Syntax
lapack_int LAPACKE_strevc
(
int
matrix_layout
,
char
side
,
char
howmny
,
lapack_logical*
select
,
lapack_int
n
,
const float*
t
,
lapack_int
ldt
,
float*
vl
,
lapack_int
ldvl
,
float*
vr
,
lapack_int
ldvr
,
lapack_int
mm
,
lapack_int*
m
);
lapack_int LAPACKE_dtrevc
(
int
matrix_layout
,
char
side
,
char
howmny
,
lapack_logical*
select
,
lapack_int
n
,
const double*
t
,
lapack_int
ldt
,
double*
vl
,
lapack_int
ldvl
,
double*
vr
,
lapack_int
ldvr
,
lapack_int
mm
,
lapack_int*
m
);
lapack_int LAPACKE_ctrevc
(
int
matrix_layout
,
char
side
,
char
howmny
,
const lapack_logical*
select
,
lapack_int
n
,
lapack_complex_float*
t
,
lapack_int
ldt
,
lapack_complex_float*
vl
,
lapack_int
ldvl
,
lapack_complex_float*
vr
,
lapack_int
ldvr
,
lapack_int
mm
,
lapack_int*
m
);
lapack_int LAPACKE_ztrevc
(
int
matrix_layout
,
char
side
,
char
howmny
,
const lapack_logical*
select
,
lapack_int
n
,
lapack_complex_double*
t
,
lapack_int
ldt
,
lapack_complex_double*
vl
,
lapack_int
ldvl
,
lapack_complex_double*
vr
,
lapack_int
ldvr
,
lapack_int
mm
,
lapack_int*
m
);
Include Files
- mkl.h
Description
The routine computes some or all of the right and/or left eigenvectors of an upper triangular matrix , as computed by hseqr.
T
(or, for real flavors, an upper quasi-triangular matrix T
). Matrices of this type are produced by the Schur factorization of a general matrix: A
= Q
*T
*Q
H
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
y
H
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 orthogonal/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
.Input Parameters
- matrix_layout
- Specifies whether matrix storage layout is row major (LAPACK_ROW_MAJOR) or column major (LAPACK_COL_MAJOR).
- side
- Must be'R'or'L'or'B'.If, then only right eigenvectors are computed.side='R'If, then only left eigenvectors are computed.side='L'If, then all eigenvectors are computed.side='B'
- howmny
- Must be'A'or'B'or'S'.If, then all eigenvectors (as specified byhowmny='A'side) are computed.If, then all eigenvectors (as specified byhowmny='B'side) are computed and backtransformed by the matrices supplied invlandvr.If, then selected eigenvectors (as specified byhowmny='S'sideandselect) are computed.
- select
- Array, size at least max (1,n).If,howmny='S'selectspecifies which eigenvectors are to be computed.Iforhowmny='A''B',selectis not referenced.For real flavors:Ifomega[is a real eigenvalue, the corresponding real eigenvector is computed ifj]select[isj]1.Ifomega[andj- 1]omega[are the real and imaginary parts of a complex eigenvalue, the corresponding complex eigenvector is computed if eitherj]select[orj- 1]select[isj]1, and on exitselect[is set toj- 1]1andselect[is set toj]0.For complex flavors:The eigenvector corresponding to thej-th eigenvalue is computed ifselect[isj- 1]1.
- n
- The order of the matrixT().n≥0
- t,vl,vr
- Arrays:t(size max(1,contains theldt*n))n-by-nmatrixTin Schur canonical form. For complex flavorsctrevcandztrevc, contains the upper triangular matrixT.vl(size max(1,ldvl*mm) for column major layout and max(1,ldvl*n) for row major layout)Ifandhowmny='B'orside='L''B', thenvlmust contain ann-by-nmatrixQ(usually the matrix of Schur vectors returned by?hseqr).Iforhowmny='A''S', thenvlneed not be set.The arrayvlis not referenced if.side='R'vr(size max(1,ldvr*mm) for column major layout and max(1,ldvr*n) for row major layout)Ifandhowmny='B'orside='R''B', thenvrmust contain ann-by-nmatrixQ(usually the matrix of Schur vectors returned by?hseqr). .Iforhowmny='A''S', thenvrneed not be set.The arrayvris not referenced if.side='L'
- ldt
- The leading dimension oft; at least max(1,n).
- ldvl
- The leading dimension ofvl.Iforside='L''B',.ldvl≥nIf,side='R'.ldvl≥1
- ldvr
- The leading dimension ofvr.Iforside='R''B',.ldvr≥nIf,side='L'.ldvr≥1
- mm
- The number of columns in the arraysvland/orvr. Must be at leastm(the precise number of columns required).Iforhowmny='A''B',.mm=nIf:howmny='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
Output Parameters
- select
- If a complex eigenvector of a real matrix was selected as specified above, thenselect[is set toj]1andselect[toj+ 1]0
- t
- ctrevc/ztrevcmodify thetarray, which is restored on exit.
- vl,vr
- Iforside='L''B',vlcontains the computed left eigenvectors (as specified byhowmnyandselect).Iforside='R''B',vrcontains the computed right eigenvectors (as specified byhowmnyandselect).The eigenvectors treated column-wise form a rectangularn-by-mmmatrix.For real flavors: 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
- For complex flavors: the number of selected eigenvectors.Iforhowmny='A''B',mis set ton.For real flavors: the number of columns ofvland/orvractually used to store the selected eigenvectors.Iforhowmny='A''B',mis set ton.
Return Values
This function returns a value
info
.If , the execution is successful.
info
=0If , the
info
= -i
i
-th parameter had an illegal value.Application Notes
If is the corresponding computed eigenvector, then the angle , ) between them is bounded as follows: ,) where sep is the reciprocal condition number of . The condition number sep may be computed by calling
x
i
is an exact right eigenvector and y
i
θ
(y
i
x
i
θ
(y
i
x
i
≤
(c
(n
)ε
||T
||2
)/sepi
i
x
i
i
?trsna
.