p?trevc
p?trevc
Computes right and/or left eigenvectors of a complex upper triangular matrix in parallel.
Syntax
void pctrevc
(
const
char*
side
,
const
char*
howmny
,
const
MKL_INT*
select
,
const
MKL_INT*
n
,
MKL_Complex8*
t
,
const
MKL_INT*
desct
,
MKL_Complex8*
vl
,
const
MKL_INT*
descvl
,
MKL_Complex8*
vr
,
const
MKL_INT*
descvr
,
const
MKL_INT*
mm
,
MKL_INT*
m
,
MKL_Complex8*
work
,
float*
rwork
,
MKL_INT*
info
);
void pztrevc
(
const
char*
side
,
const
char*
howmny
,
const
MKL_INT*
select
,
const
MKL_INT*
n
,
MKL_Complex16*
t
,
const
MKL_INT*
desct
,
MKL_Complex16*
vl
,
const
MKL_INT*
descvl
,
MKL_Complex16*
vr
,
const
MKL_INT*
descvr
,
const
MKL_INT*
mm
,
MKL_INT*
m
,
MKL_Complex16*
work
,
double*
rwork
,
MKL_INT*
info
);
void pdtrevc
(
const
char*
side
,
const
char*
howmny
,
const
MKL_INT*
select
,
const
MKL_INT*
n
,
double*
t
,
const
MKL_INT*
desct
,
double*
vl
,
const
MKL_INT*
descvl
,
double*
vr
,
const
MKL_INT*
descvr
,
const
MKL_INT*
mm
,
MKL_INT*
m
,
double*
work
,
MKL_INT*
info
);
void pstrevc
(
const
char*
side
,
const
char*
howmny
,
const
MKL_INT*
select
,
const
MKL_INT*
n
,
float*
t
,
const
MKL_INT*
desct
,
float*
vl
,
const
MKL_INT*
descvl
,
float*
vr
,
const
MKL_INT*
descvr
,
const
MKL_INT*
mm
,
MKL_INT*
m
,
float*
work
,
MKL_INT*
info
);
Include Files
- mkl_scalapack.h
Description
p?trevc
computes some or all of the right and/or left eigenvectors of a complex upper triangular matrix T
in parallel.The right eigenvector x and the left eigenvector y of
T
corresponding to an eigenvalue w are defined by:T
*x = w*x,y'*
T
= w*y'where y' denotes the conjugate transpose of the vector y.
If all eigenvectors are requested, the routine may either return the matrices
X
and/or Y
of right or left eigenvectors of T
, or the products Q
*X
and/or Q
*Y
, where Q
is an input unitary matrix. If T
was obtained from the Schur factorization of an original matrix A
= Q
*T
*Q', then Q
*X
and Q
*Y
are the matrices of right or left eigenvectors of A
.Input Parameters
- side
- (global)= 'R': compute right eigenvectors only;= 'L': compute left eigenvectors only;= 'B': compute both right and left eigenvectors.
- howmny
- (global)= 'A': compute all right and/or left eigenvectors;= 'B': compute all right and/or left eigenvectors, and backtransform them using the input matrices supplied invrand/orvl;= 'S': compute selected right and/or left eigenvectors, specified by the logical arrayselect.
- select
- (global)Array, size (n)Ifhowmny= 'S',selectspecifies the eigenvectors to be computed.Ifhowmny= 'A' or 'B',selectis not referenced. To select the eigenvector corresponding to thej-th eigenvalue,select[must be set toj- 1]non-zero.
- n
- (global)The order of the matrixT.n>= 0.
- t
- (local)Array, size.lld_t*LOCc(n)The upper triangular matrixT.Tis modified, but restored on exit.
- desct
- (global and local)Array of sizedlen_.The array descriptor for the distributed matrixT.
- vl
- (local)Array, size (descvl(lld_),mm)On entry, ifside= 'L' or 'B' andhowmny= 'B',vlmust contain ann-by-nmatrixQ(usually the unitary matrixQof Schur vectors returned by?hseqr).
- descvl
- (global and local)Array of sizedlen_.The array descriptor for the distributed matrixVL.
- vr
- (local)Array, size.descvr(lld_)*mmOn entry, ifside= 'R' or 'B' andhowmny= 'B',vrmust contain ann-by-nmatrixQ(usually the unitary matrixQof Schur vectors returned by?hseqr).
- descvr
- (global and local)Array of sizedlen_.The array descriptor for the distributed matrixVR.
- mm
- (global)The number of columns in the arraysvland/orvr.mm>=m.
- work
- (local)Array, size ( 2*desct(lld_) )Additional workspace may be required ifp?lattrsis updated to usework.
- rwork
- Array, size (desct(lld_) )
Output Parameters
- t
- The upper triangular matrixT.Tis modified, but restored on exit.
- vl
- On exit, ifside= 'L' or 'B',vlcontains:ifhowmny= 'A', the matrixYof left eigenvectors ofT;ifhowmny= 'B', the matrixQ*Y;ifhowmny= 'S', the left eigenvectors ofTspecified byselect, stored consecutively in the columns ofvl, in the same order as their eigenvalues. Ifside= 'R',vlis not referenced.
- vr
- On exit, ifside= 'R' or 'B',vrcontains:ifhowmny= 'A', the matrixXof right eigenvectors ofT;ifhowmny= 'B', the matrixQ*X;ifhowmny= 'S', the right eigenvectors ofTspecified byselect, stored consecutively in the columns ofvr, in the same order as their eigenvalues. Ifside= 'L',vris not referenced.
- m
- (global)The number of columns in the arraysvland/orvractually used to store the eigenvectors. Ifhowmny= 'A' or 'B',mis set ton. Each selected eigenvector occupies one column.
- info
- (global)= 0: successful exit< 0: ifinfo= -i, the i-th argument had an illegal value
Application Notes
The algorithm used in this program is basically backward (forward) substitution. Scaling should be used to make the code robust against possible overflow. But scaling has not yet been implemented in
p?lattrs
which is called by this routine to solve the triangular systems. p?lattrs
just calls p?trsv
.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|.