SGGEVX(3)
π¦ sggevx.f(3) β Library Functions Manual π¦
okay so real talk: this is the manual page for /home/abui...RC/sggevx.f(3), and the manual it lives in is literally called Library Functions Manual. that's the whole top-of-page situation, bestie. now let's get into it π
β¨ NAME β¨
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/sggevx.f
yes. that's the name. it's a file path. we love a low-effort NAME section, no cap π
πΈ SYNOPSIS πΈ
Functions/Subroutines
subroutine SGGEVX (balanc, jobvl, jobvr, sense, n, a, lda, b, ldb,
alphar, alphai, beta, vl, ldvl, vr, ldvr, ilo, ihi, lscale, rscale,
abnrm, bbnrm, rconde, rcondv, work, lwork, iwork, bwork, info)
SGGEVX computes the eigenvalues and, optionally, the left and/or
right eigenvectors for GE matrices
like, she's the whole cast list. 29 arguments. main character energy fr fr π
π Function/Subroutine Documentation π
subroutine SGGEVX
subroutine SGGEVX (character balanc, character jobvl, character jobvr,
character sense, 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,
integer ilo, integer ihi, real, dimension( * ) lscale, real, dimension(
* ) rscale, real abnrm, real bbnrm, real, dimension( * ) rconde, real,
dimension( * ) rcondv, real, dimension( * ) work, integer lwork,
integer, dimension( * ) iwork, logical, dimension( * ) bwork, integer
info)
SGGEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices β¨
π― PURPOSE π―
okay so here's the vibe: SGGEVX 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. π¦
it can also optionally compute a balancing transformation to improve the conditioning of the eigenvalues and eigenvectors (ILO, IHI, LSCALE, RSCALE, ABNRM, and BBNRM), reciprocal condition numbers for the eigenvalues (RCONDE), and reciprocal condition numbers for the right eigenvectors (RCONDV). she does it all, honestly π
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's usually represented as the pair (alpha,beta), because there's a reasonable interpretation for beta=0, and even for both being zero. yes, both. we said what we said π
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). math is slaying today, we love to see it β
π Parameters π
bestie there are so many. every single one is here. hydrate before reading π§
BALANCβ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. noted, bestie π
JOBVLβCHARACTER*1.= 'N': do not compute the left generalized eigenvectors;= 'V': compute the left generalized eigenvectors.
JOBVRβCHARACTER*1.= 'N': do not compute the right generalized eigenvectors;= 'V': compute the right generalized eigenvectors.
SENSEβ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βINTEGER. the order of the matricesA,B,VL, andVR.N >= 0.AβREALarray, dimension(LDA, N). on entry, the matrixAin the pair(A,B). on exit,Ahas been overwritten. ifJOBVL='V'orJOBVR='V'or both, thenAcontains the first part of the real Schur form of the versions of the inputAandB.LDAβINTEGER. the leading dimension ofA.LDA >= max(1,N).BβREALarray, dimension(LDB, N). on entry, the matrixBin the pair(A,B). on exit,Bhas been overwritten. ifJOBVL='V'orJOBVR='V'or both, thenBcontains the second part of the real Schur form of the versions of the inputAandB.LDBβINTEGER. the leading dimension ofB.LDB >= max(1,N).ALPHARβREALarray, dimension(N).ALPHAIβREALarray, dimension(N).BETAβREALarray, 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. so likeβ¦ the user should avoid naively computing the ratioALPHA/BETA. do not do the naive thing, i'm begging π however,ALPHARandALPHAIwill be always less than and usually comparable withnorm(A)in magnitude, andBETAalways less than and usually comparable withnorm(B).
- > β οΈ note: the quotients
VLβREALarray, dimension(LDVL,N). ifJOBVL = '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 will be scaled so the largest component haveabs(real part) + abs(imag. part) = 1. not referenced ifJOBVL = 'N'.LDVLβINTEGER. the leading dimension of the matrixVL.LDVL >= 1, and ifJOBVL = 'V',LDVL >= N.VRβREALarray, dimension(LDVR,N). ifJOBVR = '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 will be scaled so the largest component haveabs(real part) + abs(imag. part) = 1. not referenced ifJOBVR = 'N'.LDVRβINTEGER. the leading dimension of the matrixVR.LDVR >= 1, and ifJOBVR = 'V',LDVR >= N.ILOβINTEGER. (the deets live withIHI, keep scrolling π«Ά)IHIβINTEGER.ILOandIHIare integer values such that on exitA(i,j) = 0andB(i,j) = 0ifi > jandj = 1,...,ILO-1ori = IHI+1,...,N. ifBALANC = 'N'or'S',ILO = 1andIHI = N.LSCALEβREALarray, dimension(N). details of the permutations and scaling factors applied to the left side ofAandB. ifPL(j)is the index of the row interchanged with rowj, andDL(j)is the scaling factor applied to rowj, 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.
RSCALEβREALarray, dimension(N). details of the permutations and scaling factors applied to the right side ofAandB. ifPR(j)is the index of the column interchanged with columnj, andDR(j)is the scaling factor applied to columnj, 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.
ABNRMβREAL. the one-norm of the balanced matrixA. norm girlies rise π§BBNRMβREAL. the one-norm of the balanced matrixB.RCONDEβREALarray, dimension(N). ifSENSE = 'E'or'B', the reciprocal condition numbers of the eigenvalues, stored in consecutive elements of the array. for a complex conjugate pair of eigenvalues two consecutive elements ofRCONDEare set to the same value. thusRCONDE(j),RCONDV(j), and the j-th columns ofVLandVRall correspond to the j-th eigenpair. ifSENSE = 'N'or'V',RCONDEis not referenced.
π RCONDV
(bestie we are SO not done β part 2 picks this up right here, don't move π)
RCONDV π
RCONDV is a REAL array, dimension (N).
If SENSE = 'V' or 'B', this is where the estimated reciprocal condition numbers of the eigenvectors live β stored in consecutive elements of the array. For a complex eigenvector, two consecutive elements of RCONDV are set to the same value. If the eigenvalues cannot be reordered to compute RCONDV(j), then RCONDV(j) is set to 0; this can only occur when the true value would be very small anyway. (So it's giving "we tried, but the number was too tiny to care." π)
If SENSE = 'N' or 'E', RCONDV is not referenced. Periodt.
WORK
WORK is a REAL array, dimension (MAX(1,LWORK)).
On exit, if INFO = 0, WORK(1) returns the optimal LWORK. Slay β it tells you how much room it actually wanted. β¨
LWORK
LWORK is INTEGER.
It's the dimension of the array WORK. The requirements are:
LWORK >= max(1,2*N).- If
BALANC = 'S'or'B', orJOBVL = 'V', orJOBVR = 'V', thenLWORK >= max(1,6*N). - If
SENSE = 'E', thenLWORK >= max(1,10*N). - If
SENSE = 'V'or'B', thenLWORK >= 2*N*N+8*N+16.
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA. So -1 is basically the "bestie, just tell me how much space I need" move. π«Ά
IWORK
IWORK is an INTEGER array, dimension (N+6).
If SENSE = 'E', IWORK is not referenced. No cap.
BWORK
BWORK is a LOGICAL array, dimension (N).
If SENSE = 'N', BWORK is not referenced. That's the vibe check β if you don't need it, it's not invited. π
INFO
INFO is INTEGER.
= 0: successful exit. π iconic.< 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.
Further Details:
Balancing a matrix pair (A,B) includes, 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. π (iykyk)
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 387 of file sggevx.f.
Author π«Ά (the Doxygen one)
Generated automatically by Doxygen for LAPACK from the source code.
And that's the whole page, bestie. This masterpiece is from LAPACK Version 3.12.0, source /home/abui...RC/sggevx.f(3) β the footer didn't hand us a date, so we're just gonna vibe with the version and the file path. No cap, that's the tea. πβ¨π
π¦ 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