ZGGEVX(3)
π¦ zggevx.f(3) β the LAPACK girlies' fave π
okay so bestie, you found the zggevx.f page from Library Functions Manual and honestly? iconic. this is the part 1 of the glow-up and there's more coming, so don't go anywhere π«Ά
β¨ NAME β¨
the whole vibe of this file, literally:
/home/abuild/rpmbuild/BUILD/lapack-
static-3.12.0-build/lapack-3.12.0/SRC/zggevx.f
πΈ SYNOPSIS πΈ
Functions/Subroutines
here's the cast, main character energy of course:
subroutine ZGGEVX (balanc, jobvl, jobvr, sense, n, a, lda, b, ldb,
alpha, beta, vl, ldvl, vr, ldvr, ilo, ihi, lscale, rscale, abnrm,
bbnrm, rconde, rcondv, work, lwork, rwork, iwork, bwork, info)
and what does she do? she computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices β¨
π Function/Subroutine Documentation π
the full signature, no cap
subroutine ZGGEVX (character balanc, character jobvl, character jobvr,
character sense, integer n, complex*16, dimension( lda, * ) a, integer
lda, complex*16, dimension( ldb, * ) b, integer ldb, complex*16,
dimension( * ) alpha, complex*16, dimension( * ) beta, complex*16,
dimension( ldvl, * ) vl, integer ldvl, complex*16, dimension( ldvr, * )
vr, integer ldvr, integer ilo, integer ihi, double precision, dimension(
* ) lscale, double precision, dimension( * ) rscale, double precision
abnrm, double precision bbnrm, double precision, dimension( * ) rconde,
double precision, dimension( * ) rcondv, complex*16, dimension( * )
work, integer lwork, double precision, dimension( * ) rwork, integer,
dimension( * ) iwork, logical, dimension( * ) bwork, integer info)
ZGGEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices π (yes, she said it twice, because she ate and left no crumbs)
π Purpose π
okay, so picture this π β ZGGEVX takes a pair of N-by-N complex nonsymmetric matrices (A,B) and computes the generalized eigenvalues for them, plus, if you want, the left and/or right generalized eigenvectors. obsessed.
optionally she also computes a balancing transformation to improve the conditioning of the eigenvalues and eigenvectors β that's ILO, IHI, LSCALE, RSCALE, ABNRM, and BBNRM right there π β plus reciprocal condition numbers for the eigenvalues (RCONDE) and reciprocal condition numbers for the right eigenvectors (RCONDV).
so what even is a generalized eigenvalue for a pair of matrices (A,B)? bestie it's a scalar lambda, or a ratio alpha/beta = lambda, such that A - lambda*B is singular. she's usually represented as the pair (alpha,beta) because there's a reasonable interpretation for beta=0, and even for both being zero. fr fr, both zero is valid here π
the right eigenvector v(j) corresponding to the eigenvalue lambda(j) of (A,B) satisfies
A * v(j) = lambda(j) * B * v(j) .
the left eigenvector u(j) corresponding to the eigenvalue lambda(j) of (A,B) satisfies
u(j)**H * A = lambda(j) * u(j)**H * B.
where u(j)**H is the conjugate-transpose of u(j). conjugate-transpose is basically the glow-up of a matrix, iykyk π¦
π Parameters π
every single one, in order, no skips because we don't do that here π«Ά
BALANC
BALANC is CHARACTER*1
specifies the balance option to be performed:
'N': do not diagonally scale or permute;'P': permute only;'S': scale only;'B': both permute and scale.
computed reciprocal condition numbers will be for the matrices after permuting and/or balancing. permuting does not change condition numbers (in exact arithmetic), but balancing does. so like, keep that in mind π
JOBVL
JOBVL is CHARACTER*1
'N': do not compute the left generalized eigenvectors;'V': compute the left generalized eigenvectors.
JOBVR
JOBVR is CHARACTER*1
'N': do not compute the right generalized eigenvectors;'V': compute the right generalized eigenvectors.
SENSE
SENSE is CHARACTER*1
determines which reciprocal condition numbers are computed:
'N': none are computed;'E': computed for eigenvalues only;'V': computed for eigenvectors only;'B': computed for eigenvalues and eigenvectors.
N
N is INTEGER
the order of the matrices A, B, VL, and VR. N >= 0 β
A
A is COMPLEX*16 array, dimension (LDA, N)
on entry, the matrix A in the pair (A,B).
on exit, A has been overwritten. if JOBVL='V' or JOBVR='V' or both, then A contains the first part of the complex Schur form of the versions of the input A and B. π¦
LDA
LDA is INTEGER
the leading dimension of A. LDA >= max(1,N).
B
B is COMPLEX*16 array, dimension (LDB, N)
on entry, the matrix B in the pair (A,B).
on exit, B has been overwritten. if JOBVL='V' or JOBVR='V' or both, then B contains the second part of the complex Schur form of the versions of the input A and B. π«
LDB
LDB is INTEGER
the leading dimension of B. LDB >= max(1,N).
ALPHA
ALPHA is COMPLEX*16 array, dimension (N)
BETA
BETA is COMPLEX*16 array, dimension (N)
on exit, ALPHA(j)/BETA(j), j=1,...,N, will be the generalized eigenvalues.
Note: the quotientALPHA(j)/BETA(j)) may easily over- or underflow, andBETA(j)may even be zero. Thus, the user should avoid naively computing the ratioALPHA/BETA. However,ALPHAwill be always less than and usually comparable withnorm(A)in magnitude, andBETAalways less than and usually comparable withnorm(B). π pls don't just divide them, bestie, that's the whole point
VL
VL is COMPLEX*16 array, dimension (LDVL,N)
if JOBVL = 'V', the left generalized eigenvectors u(j) are stored one after another in the columns of VL, in the same order as their eigenvalues.
each eigenvector will be scaled so the largest component will have abs(real part) + abs(imag. part) = 1.
not referenced if JOBVL = 'N'.
LDVL
LDVL is INTEGER
the leading dimension of the matrix VL. LDVL >= 1, and if JOBVL = 'V', LDVL >= N.
VR
VR is COMPLEX*16 array, dimension (LDVR,N)
if JOBVR = 'V', the right generalized eigenvectors v(j) are stored one after another in the columns of VR, in the same order as their eigenvalues.
each eigenvector will be scaled so the largest component will have abs(real part) + abs(imag. part) = 1.
not referenced if JOBVR = 'N'.
LDVR
LDVR is INTEGER
the leading dimension of the matrix VR. LDVR >= 1, and if JOBVR = 'V', LDVR >= N.
ILO
ILO is INTEGER
IHI
IHI is INTEGER
ILO and IHI are integer values such that on exit A(i,j) = 0 and B(i,j) = 0 if i > j and j = 1,...,ILO-1 or i = IHI+1,...,N.
if BALANC = 'N' or 'S', ILO = 1 and IHI = N. π
LSCALE
LSCALE is DOUBLE PRECISION array, dimension (N)
details of the permutations and scaling factors applied to the left side of A and B. if PL(j) is the index of the row interchanged with row j, and DL(j) is the scaling factor applied to row j, then
LSCALE(j) = PL(j) for j = 1,...,ILO-1
= DL(j) for j = ILO,...,IHI
= PL(j) for j = IHI+1,...,N.
the order in which the interchanges are made is N to IHI+1, then 1 to ILO-1. don't come for me, that's just how she rolls π
RSCALE
RSCALE is DOUBLE PRECISION array, dimension (N)
details of the permutations and scaling factors applied to the right side of A and B. if PR(j) is the index of the column interchanged with column j, and DR(j) is the scaling factor applied to column j, then
RSCALE(j) = PR(j) for j = 1,...,ILO-1
= DR(j) for j = ILO,...,IHI
= PR(j) for j = IHI+1,...,N
the order in which the interchanges are made is N to IHI+1, then 1 to ILO-1. same energy, other side β¨
ABNRM
ABNRM is DOUBLE PRECISION
the one-norm of the balanced matrix A. β
BBNRM
BBNRM is DOUBLE PRECISION
the one-norm of the balanced matrix B. β
RCONDE
RCONDE is DOUBLE PRECISION array, dimension (N)
if SENSE = 'E' or 'B', the reciprocal condition numbers of the eigenvalues, stored in consecutive elements of the array.
if SENSE = 'N' or 'V', RCONDE is not referenced. π
RCONDV
RCONDV is DOUBLE PRECISION array, dimension (N)
if JOB = 'V' or 'B', the estimated reciprocal condition numbers of the eigenvectors, stored in consecutive elements of the array. if the eigenvalues cannot be reordered to compute RCONDV(j), RCONDV(j) is set to 0; this can only occur when the true value would be very small anyway. so like, it's fine, lowkey π
if SENSE = 'N' or 'E', RCONDV is not referenced.
WORK
WORK is COMPLEX*16 array, dimension (MAX(1,LWORK))
on exit, if INFO = 0, WORK(1) returns the optimal LWORK. π
LWORK
LWORK is INTEGER
the dimension of the array WORK. LWORK >= max(1,2*N).
if SENSE = 'E', LWORK >= max(1,4*N).
if SENSE = 'V' or 'B', LWORK >= max(1,2*N*N+2*N).
ifLWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA. sneaky but valid π§
RWORK
RWORK is a DOUBLE PRECISION array, dimension (lrwork) β and lrwork must be at least max(1,6*N) if BALANC = 'S' or 'B', and at least max(1,2*N) otherwise. Real workspace. She's real, she's workspace, she's doing the most. β¨
π¦ IWORK
IWORK is an INTEGER array, dimension (N+2). If SENSE = 'E', IWORK is not referenced. So she's literally just vibing offstage for that mode, bestie. π
π BWORK
BWORK is a LOGICAL array, dimension (N). If SENSE = 'N', BWORK is not referenced. Not even a little bit. π«Ά
π INFO
INFO is an INTEGER. Here's the tea, no cap:
= 0: successful exit. Slay. β< 0: ifINFO = -i, thei-th argument had an illegal value. Rude, but okay. π= 1,...,N: The QZ iteration failed. No eigenvectors have been calculated, butALPHA(j)andBETA(j)should be correct forj=INFO+1,...,N.> N:=N+1: other than QZ iteration failed inZHGEQZ.=N+2: error return fromZTGEVC.
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π Further Details
Balancing a matrix pair (A,B) is a whole two-step moment, okay? First, permuting rows and columns to isolate eigenvalues. Second, applying diagonal similarity transformation to the rows and columns to make the rows and columns as close in norm as possible. 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 section 4.11.1.2 of LAPACK Users' Guide. π¦
An approximate error bound on the chordal distance between the i-th computed generalized eigenvalue w and the corresponding exact eigenvalue lambda is
chord(w, lambda) <= EPS * norm(ABNRM, BBNRM) / RCONDE(I)
An approximate error bound for the angle between the i-th computed eigenvector VL(i) or VR(i) is given by
EPS * norm(ABNRM, BBNRM) / DIF(i).
For further explanation of the reciprocal condition numbers RCONDE and RCONDV, see section 4.11 of LAPACK User's Guide. β¨
Definition at line 370 of file zggevx.f.
π Author
Generated automatically by Doxygen for LAPACK from the source code.
That's the whole page, bestie β LAPACK Version 3.12.0, straight from /home/abui...RC/zggevx.f(3), with all the footer energy included. Periodt. ππβ¨
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms