/home/abui...RC/cggev.f(3)
πΈ NAME πΈ
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/cggev.f β okay bestie, this is the cggev.f page from the Library Functions Manual (yes, /home/abui...RC/cggev.f(3) π
), and itβs all about the LAPACK routine that computes generalized eigenvalues and optionally the left and/or right generalized eigenvectors for GE matrices. Iconic behavior, honestly.
β¨ SYNOPSIS β¨
π§ Functions/Subroutines π§
subroutine CGGEV (jobvl, jobvr, n, a, lda, b, ldb, alpha, beta, vl,
ldvl, vr, ldvr, work, lwork, rwork, info)
CGGEV computes the eigenvalues and, optionally, the left and/or
right eigenvectors for GE matrices
π Function/Subroutine Documentation π
subroutine CGGEV (character jobvl, character jobvr, integer n, complex,
dimension( lda, * ) a, integer lda, complex, dimension( ldb, * ) b,
integer ldb, complex, dimension( * ) alpha, complex, dimension( * )
beta, complex, dimension( ldvl, * ) vl, integer ldvl, complex,
dimension( ldvr, * ) vr, integer ldvr, complex, dimension( * ) work,
integer lwork, real, dimension( * ) rwork, integer info)
CGGEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices. Slay.
π Purpose π
okay so CGGEV computes, for a pair of N-by-N complex nonsymmetric matrices (A,B), the generalized eigenvalues, and optionally the left and/or right generalized eigenvectors. Literally the whole point.
A generalized eigenvalue for a pair of matrices (A,B) is a scalar lambda or a ratio alpha/beta = lambda, such that A - lambda*B is singular. It is usually represented as the pair (alpha,beta), as there is a reasonable interpretation for beta=0, and even for both being zero. No cap, that zero-beta case is lowkey important.
The right generalized eigenvector v(j) corresponding to the generalized eigenvalue lambda(j) of (A,B) satisfies
A * v(j) = lambda(j) * B * v(j).
The left generalized eigenvector u(j) corresponding to the generalized eigenvalues 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). math girlie said conjugate-transpose and meant it π
π¦ Parameters π¦
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.
NβN is INTEGER. The order of the matricesA,B,VL, andVR.N >= 0.AβA is COMPLEX array, dimension (LDA, N). On entry, the matrixAin the pair(A,B). On exit,Ahas been overwritten. rip original A, she served while she could π«ΆLDAβLDA is INTEGER. The leading dimension ofA.LDA >= max(1,N).BβB is COMPLEX array, dimension (LDB, N). On entry, the matrixBin the pair(A,B). On exit,Bhas been overwritten. same energy, bestie, B is also getting replaced πLDBβLDB is INTEGER. The leading dimension ofB.LDB >= max(1,N).ALPHAβALPHA is COMPLEX array, dimension (N).BETAβBETA is COMPLEX array, dimension (N). On exit,ALPHA(j)/BETA(j),j=1,...,N, will be the generalized eigenvalues.
β οΈ note: the quotientsALPHA(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). do not just divide, bestie, I am begging π
VLβVL is COMPLEX array, dimension (LDVL,N). IfJOBVL = 'V', the left generalized eigenvectorsu(j)are stored one after another in the columns ofVL, in the same order as their eigenvalues. Each eigenvector is scaled so the largest component hasabs(real part) + abs(imag. part) = 1. Not referenced ifJOBVL = 'N'. scaling said βlargest component, you are the momentβ β¨LDVLβLDVL is INTEGER. The leading dimension of the matrixVL.LDVL >= 1, and ifJOBVL = 'V',LDVL >= N.VRβVR is COMPLEX array, dimension (LDVR,N). IfJOBVR = 'V', the right generalized eigenvectorsv(j)are stored one after another in the columns ofVR, in the same order as their eigenvalues. Each eigenvector is scaled so the largest component hasabs(real part) + abs(imag. part) = 1. Not referenced ifJOBVR = 'N'. same scaling blessing, different side π«LDVRβLDVR is INTEGER. The leading dimension of the matrixVR.LDVR >= 1, and ifJOBVR = 'V',LDVR >= N.WORKβWORK is COMPLEX array, dimension (MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK. workspace bestie is carrying the whole routine on her back π₯LWORKβLWORK is INTEGER. The dimension of the arrayWORK.LWORK >= max(1,2*N). For good performance,LWORKmust generally be larger.
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. workspace query era, we love a no-drama probe π
RWORKβRWORK is REAL array, dimension (8*N).INFOβINFO is INTEGER.= 0:successful exit< 0:ifINFO = -i, the i-th argument had an illegal value.=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 then QZ iteration failed inCHGEQZ,=N+2:error return fromCTGEVC.
π«Ά Author π«Ά
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 215 of file cggev.f.
π Author π
Generated automatically by Doxygen for LAPACK from the source code.
Final vibe check: LAPACK, version 3.12.0, page /home/abui...RC/cggev.f(3) β the footer gives no date, so thatβs the whole sign-off, bestie πβ¨
π¦ 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