SRC/sggev.f(3)
SRC/sggev.f(3) π
Library Functions Manual β folding the manual name right in here so you have the whole vibe up top, bestie. β¨
πΈ NAME πΈ
SRC/sggev.f β like, thatβs literally the file, no cap. π
β¨ SYNOPSIS β¨
π¦ Functions/Subroutines π¦
subroutine sggev (jobvl, jobvr, n, a, lda, b, ldb, alphar, alphai, beta, vl, ldvl, vr, ldvr, work, lwork, info)β SGGEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices. Slay. π
π Function/Subroutine Documentation π
π subroutine sggev π
subroutine sggev (character jobvl, character jobvr, integer n, real,
dimension( lda, * ) a, integer lda, real, dimension( ldb, * ) b, integer
ldb, real, dimension( * ) alphar, real, dimension( * ) alphai, real,
dimension( * ) beta, real, dimension( ldvl, * ) vl, integer ldvl, real,
dimension( ldvr, * ) vr, integer ldvr, real, dimension( * ) work,
integer lwork, integer info)
SGGEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices. Iconic behavior, honestly. π₯
π«Ά Purpose:
Okay so bestie, SGGEV computes, for a pair of N-by-N real nonsymmetric matrices (A,B), the generalized eigenvalues, and optionally, the left and/or right generalized eigenvectors. πΈ
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. π
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). Yes, that little **H is doing main character work. π
π 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 matrices
A,B,VL, andVR.N >= 0.
- The order of the matrices
AβA is REAL array, dimension (LDA, N)- On entry, the matrix
Ain the pair(A,B). - On exit,
Ahas been overwritten. π gone but not forgotten.
- On entry, the matrix
LDAβLDA is INTEGER- The leading dimension of
A.LDA >= max(1,N).
- The leading dimension of
BβB is REAL array, dimension (LDB, N)- On entry, the matrix
Bin the pair(A,B). - On exit,
Bhas been overwritten. Same energy asA, lowkey. π
- On entry, the matrix
LDBβLDB is INTEGER- The leading dimension of
B.LDB >= max(1,N).
- The leading dimension of
ALPHARβALPHAR is REAL array, dimension (N)ALPHAIβALPHAI is REAL array, dimension (N)BETAβBETA is REAL array, dimension (N)- On exit,
(ALPHAR(j) + ALPHAI(j)*i)/BETA(j),j=1,...,N, will be the generalized eigenvalues. IfALPHAI(j)is zero, then the j-th eigenvalue is real; if positive, then the j-th and(j+1)-st eigenvalues are a complex conjugate pair, withALPHAI(j+1)negative. π - Note: the quotients
ALPHAR(j)/BETA(j)andALPHAI(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,ALPHARandALPHAIwill be always less than and usually comparable withnorm(A)in magnitude, andBETAalways less than and usually comparable withnorm(B). This is important, bestie β do not just divide all willy-nilly. π«Ά
- On exit,
VLβVL is REAL array, dimension (LDVL,N)- If
JOBVL = 'V', the left eigenvectorsu(j)are stored one after another in the columns ofVL, in the same order as their eigenvalues. If the j-th eigenvalue is real, thenu(j) = VL(:,j), the j-th column ofVL. If the j-th and(j+1)-th eigenvalues form a complex conjugate pair, thenu(j) = VL(:,j)+i*VL(:,j+1)andu(j+1) = VL(:,j)-i*VL(:,j+1). Each eigenvector is scaled so the largest component hasabs(real part)+abs(imag. part)=1. Not referenced ifJOBVL = 'N'. π
- If
LDVLβLDVL is INTEGER- The leading dimension of the matrix
VL.LDVL >= 1, and ifJOBVL = 'V',LDVL >= N.
- The leading dimension of the matrix
VRβVR is REAL array, dimension (LDVR,N)- If
JOBVR = 'V', the right eigenvectorsv(j)are stored one after another in the columns ofVR, in the same order as their eigenvalues. If the j-th eigenvalue is real, thenv(j) = VR(:,j), the j-th column ofVR. If the j-th and(j+1)-th eigenvalues form a complex conjugate pair, thenv(j) = VR(:,j)+i*VR(:,j+1)andv(j+1) = VR(:,j)-i*VR(:,j+1). Each eigenvector is scaled so the largest component hasabs(real part)+abs(imag. part)=1. Not referenced ifJOBVR = 'N'. π¦
- If
LDVRβLDVR is INTEGER- The leading dimension of the matrix
VR.LDVR >= 1, and ifJOBVR = 'V',LDVR >= N.
- The leading dimension of the matrix
WORKβWORK is REAL array, dimension (MAX(1,LWORK))- On exit, if
INFO = 0,WORK(1)returns the optimalLWORK. β
- On exit, if
LWORKβLWORK is INTEGER- The dimension of the array
WORK.LWORK >= max(1,8*N). For good performance,LWORKmust generally be larger. - If
LWORK = -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 little workspace check, iykyk. π
- The dimension of the array
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, butALPHAR(j),ALPHAI(j), andBETA(j)should be correct forj=INFO+1,...,N.> N:=N+1:other than QZ iteration failed inSHGEQZ.=N+2:error return fromSTGEVC. π
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 224 of file sggev.f. π
π Author π
Generated automatically by Doxygen for LAPACK from the source code. β¨
Final cute sign-off: this is LAPACK Version 3.12.0, from SRC/sggev.f(3) β footer source/version/date vibes folded into this sparkly goodbye instead of copied. πβ¨π
π¦ where this page comes from
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms