DGEGV(3)
π DGEGV(3) π β Library Functions Manual
okay so we are in the Library Functions Manual, and this is the page for DGEGV(3). Header energy: /home/abui...TED/dgegv.f(3) Β· Library Functions Manual Β· /home/abui...TED/dgegv.f(3). Bestie, this routine is a whole deprecated moment, but the facts are still facts. π
πΈ NAME πΈ
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/DEPRECATED/dgegv.f
That's the file. Yes, the whole path. We keep receipts. π§Ύβ¨
β¨ SYNOPSIS β¨
π Functions/Subroutines π
subroutine DGEGV (jobvl, jobvr, n, a, lda, b, ldb, alphar, alphai, beta,
vl, ldvl, vr, ldvr, work, lwork, info)
DGEGV computes the eigenvalues and, optionally, the left and/or right eigenvectors of a real matrix pair (A,B). Main character energy, honestly. π
π¦ Function/Subroutine Documentation π¦
subroutine DGEGV (character jobvl, character jobvr, integer n, double
precision, dimension( lda, * ) a, integer lda, double precision,
dimension( ldb, * ) b, integer ldb, double precision, dimension( * )
alphar, double precision, dimension( * ) alphai, double precision,
dimension( * ) beta, double precision, dimension( ldvl, * ) vl, integer
ldvl, double precision, dimension( ldvr, * ) vr, integer ldvr, double
precision, dimension( * ) work, integer lwork, integer info)
DGEGV computes the eigenvalues and, optionally, the left and/or right eigenvectors of a real matrix pair (A,B). (Yes, same line again, because the source says it twice. Consistency slay. π)
π Purpose π
π¨ Deprecated alert: this routine is deprecated and has been replaced by routine DGGEV.
DGEGV computes the eigenvalues and, optionally, the left and/or right eigenvectors of a real matrix pair (A,B).
Given two square matrices A and B, the generalized nonsymmetric eigenvalue problem (GNEP) is to find the eigenvalues lambda and corresponding (non-zero) eigenvectors x such that
A*x = lambda*B*x.
An alternate form is to find the eigenvalues mu and corresponding eigenvectors y such that
mu*A*y = B*y.
These two forms are equivalent with mu = 1/lambda and x = y if neither lambda nor mu is zero. In order to deal with the case that lambda or mu is zero or small, two values alpha and beta are returned for each eigenvalue, such that lambda = alpha/beta and mu = beta/alpha.
The vectors x and y in the above equations are right eigenvectors of the matrix pair (A,B). Vectors u and v satisfying
u**H*A = lambda*u**H*B or mu*v**H*A = v**H*B
are left eigenvectors of (A,B).
The source also has this literal line: Note: this routine performs on A and B β yes, with the blank spot, bestie. I'm not hiding it. π
π Parameters π
JOBVLβCHARACTER*1.= 'N':do not compute the left generalized eigenvectors;= 'V':compute the left generalized eigenvectors (returned inVL).
JOBVRβCHARACTER*1.= 'N':do not compute the right generalized eigenvectors;= 'V':compute the right generalized eigenvectors (returned inVR).
NβINTEGER. The order of the matricesA,B,VL, andVR.N >= 0.AβDOUBLE PRECISION array, dimension (LDA, N). On entry, the matrixA. IfJOBVL = 'V'orJOBVR = 'V', then on exitAcontains the real Schur form ofAfrom the generalized Schur factorization of the pair(A,B)after balancing. If no eigenvectors were computed, then only the diagonal blocks from the Schur form will be correct. SeeDGGHRDandDHGEQZfor details.LDAβINTEGER. The leading dimension ofA.LDA >= max(1,N).BβDOUBLE PRECISION array, dimension (LDB, N). On entry, the matrixB. IfJOBVL = 'V'orJOBVR = 'V', then on exitBcontains the upper triangular matrix obtained fromBin the generalized Schur factorization of the pair(A,B)after balancing. If no eigenvectors were computed, then only those elements ofBcorresponding to the diagonal blocks from the Schur form ofAwill be correct. SeeDGGHRDandDHGEQZfor details.LDBβINTEGER. The leading dimension ofB.LDB >= max(1,N).ALPHARβDOUBLE PRECISION array, dimension (N). The real parts of each scalaralphadefining an eigenvalue of GNEP.ALPHAIβDOUBLE PRECISION array, dimension (N). The imaginary parts of each scalaralphadefining an eigenvalue of GNEP. IfALPHAI(j)is zero, then thej-th eigenvalue is real; if positive, then thej-th and(j+1)-st eigenvalues are a complex conjugate pair, withALPHAI(j+1) = -ALPHAI(j).BETAβDOUBLE PRECISION array, dimension (N). The scalarsbetathat define the eigenvalues of GNEP.
Together, the quantities alpha = (ALPHAR(j),ALPHAI(j)) and beta = BETA(j) represent the j-th eigenvalue of the matrix pair (A,B), in one of the forms lambda = alpha/beta or mu = beta/alpha. Since either lambda or mu may overflow, they should not, in general, be computed. π
VLβDOUBLE PRECISION array, dimension (LDVL,N). IfJOBVL = 'V', the left eigenvectorsu(j)are stored in the columns ofVL, in the same order as their eigenvalues. If thej-th eigenvalue is real, thenu(j) = VL(:,j). If thej-th and(j+1)-st eigenvalues form a complex conjugate pair, then
u(j) = VL(:,j) + i*VL(:,j+1)
and
u(j+1) = VL(:,j) - i*VL(:,j+1).
Each eigenvector is scaled so that its largest component has abs(real part) + abs(imag. part) = 1, except for eigenvectors corresponding to an eigenvalue with alpha = beta = 0, which are set to zero. Not referenced if JOBVL = 'N'.
LDVLβINTEGER. The leading dimension of the matrixVL.LDVL >= 1, and ifJOBVL = 'V',LDVL >= N.VRβDOUBLE PRECISION array, dimension (LDVR,N). IfJOBVR = 'V', the right eigenvectorsx(j)are stored in the columns ofVR, in the same order as their eigenvalues. If thej-th eigenvalue is real, thenx(j) = VR(:,j). If thej-th and(j+1)-st eigenvalues form a complex conjugate pair, then
x(j) = VR(:,j) + i*VR(:,j+1)
and
x(j+1) = VR(:,j) - i*VR(:,j+1).
Each eigenvector is scaled so that its largest component has abs(real part) + abs(imag. part) = 1, except for eigenvalues corresponding to an eigenvalue with alpha = beta = 0, which are set to zero. Not referenced if JOBVR = 'N'.
LDVRβINTEGER. The leading dimension of the matrixVR.LDVR >= 1, and ifJOBVR = 'V',LDVR >= N.WORKβDOUBLE PRECISION array, dimension (MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKβINTEGER. The dimension of the arrayWORK.LWORK >= max(1,8*N). For good performance,LWORKmust generally be larger. To compute the optimal value ofLWORK, callILAENVto get blocksizes (forDGEQRF,DORMQR, andDORGQR.) Then compute:NB -- MAX of the blocksizes for DGEQRF, DORMQR, and DORGQR;The optimalLWORKis:
2*N + MAX( 6*N, N*(NB+1) ).
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.
INFOβINTEGER.= 0:successful exit< 0:ifINFO = -i, thei-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:errors that usually indicate LAPACK problems:=N+1:error return fromDGGBAL=N+2:error return fromDGEQRF=N+3:error return fromDORMQR=N+4:error return fromDORGQR=N+5:error return fromDGGHRD=N+6:error return fromDHGEQZ(other than failed iteration)=N+7:error return fromDTGEVC=N+8:error return fromDGGBAK(computingVL)=N+9:error return fromDGGBAK(computingVR)=N+10:error return fromDLASCL(various calls)
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π Further Details π
Further Details: β literally nothing after this in the source, so that's the whole vibe. π«Ά
πΈ Balancing πΈ
ok so first things first, this driver hits up DGGBAL to permute AND scale the rows and columns of A and B. two-for-one, we love to see it π
the permutations PL and PR are picked so that PL*A*PR and PL*B*R come out upper triangular β except for the diagonal blocks A(i:j,i:j) and B(i:j,i:j), where i and j are squished as close together as humanly (algorithmically?) possible π«Ά
then the diagonal scaling matrices DL and DR get chosen so that the pair
DL*PL*A*PR*DR, DL*PL*B*PR*DR
has elements close to one. (except, bestie, the elements that started out zero β those stay zero, no cap.) β¨
and like, once the eigenvalues and eigenvectors of the balanced matrices are computed, DGGBAK swoops in and transforms the eigenvectors back to what they'd have been in perfect arithmetic if nobody had balanced anything at all. it's giving restoration arc ππ
π¦ Contents of A and B on Exit π¦
real talk, here's the tea on what you're left holding:
- if any eigenvectors are computed (so either
JOBVL='V', orJOBVR='V', or both β go off), then on exit the arraysAandBwill contain the real Schur form[*] of the versions ofAandB. - if no eigenvectors are computed, then only the diagonal blocks will be correct. that's it. that's the deal π
[*] see DHGEQZ, DGEGS, or go read the book, by Golub & van Loan, pub. by Johns Hopkins U. Press. π (iykyk)
lowkey important:Definition at line 304 of filedgegv.f.β that's where this whole vibe lives, fr fr.
π Author π
Generated automatically by Doxygen for LAPACK from the source code.
and that's a wrap on DGEGV(3) π this icon is LAPACK Version 3.12.0, living its best life at /home/abui...TED/dgegv.f(3) β slay, periodt, go compute something gorgeous πβπ
π¦ 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