?geevx
?geevx
Computes the eigenvalues and left and right eigenvectors of a general matrix, with preliminary matrix balancing, and computes reciprocal condition numbers for the eigenvalues and right eigenvectors.
Syntax
lapack_int LAPACKE_sgeevx
(
int
matrix_layout
,
char
balanc
,
char
jobvl
,
char
jobvr
,
char
sense
,
lapack_int
n
,
float*
a
,
lapack_int
lda
,
float*
wr
,
float*
wi
,
float*
vl
,
lapack_int
ldvl
,
float*
vr
,
lapack_int
ldvr
,
lapack_int*
ilo
,
lapack_int*
ihi
,
float*
scale
,
float*
abnrm
,
float*
rconde
,
float*
rcondv
);
lapack_int LAPACKE_dgeevx
(
int
matrix_layout
,
char
balanc
,
char
jobvl
,
char
jobvr
,
char
sense
,
lapack_int
n
,
double*
a
,
lapack_int
lda
,
double*
wr
,
double*
wi
,
double*
vl
,
lapack_int
ldvl
,
double*
vr
,
lapack_int
ldvr
,
lapack_int*
ilo
,
lapack_int*
ihi
,
double*
scale
,
double*
abnrm
,
double*
rconde
,
double*
rcondv
);
lapack_int LAPACKE_cgeevx
(
int
matrix_layout
,
char
balanc
,
char
jobvl
,
char
jobvr
,
char
sense
,
lapack_int
n
,
lapack_complex_float*
a
,
lapack_int
lda
,
lapack_complex_float*
w
,
lapack_complex_float*
vl
,
lapack_int
ldvl
,
lapack_complex_float*
vr
,
lapack_int
ldvr
,
lapack_int*
ilo
,
lapack_int*
ihi
,
float*
scale
,
float*
abnrm
,
float*
rconde
,
float*
rcondv
);
lapack_int LAPACKE_zgeevx
(
int
matrix_layout
,
char
balanc
,
char
jobvl
,
char
jobvr
,
char
sense
,
lapack_int
n
,
lapack_complex_double*
a
,
lapack_int
lda
,
lapack_complex_double*
w
,
lapack_complex_double*
vl
,
lapack_int
ldvl
,
lapack_complex_double*
vr
,
lapack_int
ldvr
,
lapack_int*
ilo
,
lapack_int*
ihi
,
double*
scale
,
double*
abnrm
,
double*
rconde
,
double*
rcondv
);
Include Files
- mkl.h
Description
The routine computes for an
n
-by-n
real/complex nonsymmetric matrix A
, the eigenvalues and, optionally, the left and/or right eigenvectors.Optionally also, it computes a balancing transformation to improve the conditioning of the eigenvalues and eigenvectors (
ilo
, ihi
, scale
, and abnrm
), reciprocal condition numbers for the eigenvalues (rconde
), and reciprocal condition numbers for the right eigenvectors (rcondv
).The right eigenvector of
v
A
satisfiesA
·
v
= λ
·
v
where is its eigenvalue.
λ
The left eigenvector of
u
A
satisfiesu
H
A
= λ
u
H
where denotes the conjugate transpose of . The computed eigenvectors are normalized to have Euclidean norm equal to 1 and largest component real.
u
H
u
Balancing a matrix means permuting the rows and columns to make it more nearly upper triangular, and applying a diagonal similarity transformation
D
*A
*inv(D
), where D
is a diagonal matrix, to make its rows and columns closer in norm and the condition numbers of its eigenvalues and eigenvectors smaller. The computed reciprocal condition numbers correspond to the balanced matrix. Permuting rows and columns will not change the condition numbers in exact arithmetic) but diagonal scaling will. For further explanation of balancing, see [LUG], Section 4.10.Input Parameters
- matrix_layout
- Specifies whether matrix storage layout is row major (LAPACK_ROW_MAJOR) or column major (LAPACK_COL_MAJOR).
- balanc
- Must be'N','P','S', or'B'. Indicates how the input matrix should be diagonally scaled and/or permuted to improve the conditioning of its eigenvalues.If, do not diagonally scale or permute;balanc='N'If, perform permutations to make the matrix more nearly upper triangular. Do not diagonally scale;balanc='P'If, diagonally scale the matrix, i.e. replacebalanc='S'AbyD*A*inv(, whereD)Dis a diagonal matrix chosen to make the rows and columns ofAmore equal in norm. Do not permute;If, both diagonally scale and permutebalanc='B'A.Computed reciprocal condition numbers will be for the matrix after balancing and/or permuting. Permuting does not change condition numbers (in exact arithmetic), but balancing does.
- jobvl
- Must be'N'or'V'.If, left eigenvectors ofjobvl='N'Aare not computed;If, left eigenvectors ofjobvl='V'Aare computed.Iforsense='E''B', thenjobvlmust be'V'.
- jobvr
- Must be'N'or'V'.If, right eigenvectors ofjobvr='N'Aare not computed;If, right eigenvectors ofjobvr='V'Aare computed.Iforsense='E''B', thenjobvrmust be'V'.
- sense
- Must be'N','E','V', or'B'. Determines which reciprocal condition number are computed.If, none are computed;sense='N'If, computed for eigenvalues only;sense='E'If, computed for right eigenvectors only;sense='V'If, computed for eigenvalues and right eigenvectors.sense='B'Ifsenseis'E'or'B', both left and right eigenvectors must also be computed (andjobvl='V').jobvr='V'
- n
- The order of the matrixA().n≥0
- a
- Arrays:a(size at least max(1,is an array containing thelda*n))n-by-nmatrixA.
- lda
- The leading dimension of the arraya. Must be at least max(1,n).
- ldvl,ldvr
- The leading dimensions of the output arraysvlandvr, respectively.Constraints:;ldvl≥1.ldvr≥1If,jobvl='V'(1,ldvl≥maxn);If,jobvr='V'(1,ldvr≥maxn).
Output Parameters
- a
- On exit, this array is overwritten.Iforjobvl='V', it contains the real-Schur/Schur form of the balanced version of the input matrixjobvr='V'A.
- wr,wi
- Arrays, size at least max (1,n) each. Contain the real and imaginary parts, respectively, of the computed eigenvalues. Complex conjugate pairs of eigenvalues appear consecutively with the eigenvalue having positive imaginary part first.
- w
- Array, size at least max(1,n). Contains the computed eigenvalues.
- vl,vr
- Arrays:vl(size at least max(1,.ldvl*n))If,jobvl='N'vlis not referenced.For real flavors:If thej-th eigenvalue is real,the.i-th component of thej-th eigenvectoruis stored injvl[(for column major layout and ini- 1) + (j- 1)*ldvl]vl[(for row major layout.i- 1)*ldvl+ (j- 1)]If thej-th and (j+1)-st eigenvalues form a complex conjugate pair, then fori = sqrt(-1),the.k-th component of thej-th eigenvectoruisjvl[(k- 1) + (j- 1)*ldvl] + i*vl[(k- 1) +j*ldvl] for column major layout and asvl[(k- 1)*ldvl+ (j- 1)] + i*vl[(k-1)*ldvl+j] for row major layout. Similarly, thek-th component of vector (j+1)uisj+ 1vl[(k- 1) + (j- 1)*ldvl] - i*vl[(k- 1) +j*ldvl] for column major layout and asvl[(k- 1)*ldvl+ (j- 1)] -i*vl[(k- 1)*ldvl+j] for row major layout.For complex flavors:Thei-th component of thej-th eigenvectoruis stored injvl[(for column major layout and ini- 1) + (j- 1)*ldvl]vl[(for row major layout.i- 1)*ldvl+(j- 1)]vr(size at least max(1,.ldvr*n))If,jobvr='N'vris not referenced.For real flavors:If thej-th eigenvalue is real, thenthe.i-th component ofj-th eigenvectorvis stored injvr[(for column major layout and ini- 1) + (j- 1)*ldvr]vr[(for row major layout.i- 1)*ldvr+ (j- 1)]If thej-th and (j+1)-st eigenvalues form a complex conjugate pair, then for,i= sqrt(-1)the.k-th component of thej-th eigenvectorvisjvr[(k- 1) + (j- 1)*ldvr] +i*vr[(k- 1) +j*ldvr] for column major layout and asvr[(k- 1)*ldvr+ (j- 1)] + i*vr[(k- 1)*ldvr+j] for row major layout. Similarly, thek-th component of vectorj+ 1)visj+ 1vr[(k- 1) + (j- 1)*ldvr] - i*vr[(k- 1) +j*ldvr] for column major layout and asvr[(k- 1)*ldvr+ (j- 1)] - i*vr[(k- 1)*ldvr+j] for row major layoutFor complex flavors:Thei-th component of thej-th eigenvectorvis stored injvr[(for column major layout and ini- 1) + (j- 1)*ldvr]vr[(for row major layout.i- 1)*ldvr+ (j- 1)]
- ilo,ihi
- iloandihiare integer values determined whenAwas balanced.The balancedifA(i,j) = 0i > jandj = 1,...,orilo-1i =.ihi+1,...,nIforbalanc='N''S',andilo= 1.ihi=n
- scale
- Array, size at least max(1,n). Details of the permutations and scaling factors applied when balancingA.Ifis the index of the row and column interchanged with row and columnP[j- 1]j, andis the scaling factor applied to row and columnD[j- 1]j, then, forscale[=j- 1]P[j- 1]j= 1,...,ilo-1=, forD[j- 1]