SRC/dhgeqz.f(3)
π SRC/dhgeqz.f π
okay bestie, welcome to the SRC/dhgeqz.f(3) page from the Library Functions Manual. The header literally repeats SRC/dhgeqz.f(3) like itβs matching its own outfit, and honestly? iconic behavior π
.
πΈ NAME πΈ
SRC/dhgeqz.f β thatβs the name, bestie. This whole page is about the dhgeqz subroutine doing its Fortran thing.
β¨ SYNOPSIS β¨
π«Ά Functions/Subroutines π«Ά
DHGEQZ is the main-character subroutine here. The synopsis is literally:
subroutine dhgeqz (job, compq, compz, n, ilo, ihi, h, ldh, t, ldt,
alphar, alphai, beta, q, ldq, z, ldz, work, lwork, info)
DHGEQZ
π Function/Subroutine Documentation π
Hereβs the full signature, copied exactly so nobody comes for me:
subroutine dhgeqz (character job, character compq, character compz, integer
n, integer ilo, integer ihi, double precision, dimension( ldh, * ) h,
integer ldh, double precision, dimension( ldt, * ) t, integer ldt,
double precision, dimension( * ) alphar, double precision, dimension( *
) alphai, double precision, dimension( * ) beta, double precision,
dimension( ldq, * ) q, integer ldq, double precision, dimension( ldz, *
) z, integer ldz, double precision, dimension( * ) work, integer lwork,
integer info)
DHGEQZ
π Purpose π
okay so DHGEQZ computes the eigenvalues of a real matrix pair (H,T), where H is an upper Hessenberg matrix and T is upper triangular, using the double-shift QZ method. Matrix pairs like this are produced by reducing a real matrix pair (A,B) to generalized upper Hessenberg form:
A = Q1*H*Z1**T, B = Q1*T*Z1**T,
as computed by DGGHRD.
If JOB='S', then the Hessenberg-triangular pair (H,T) is also reduced to generalized Schur form:
H = Q*S*Z**T, T = Q*P*Z**T,
where Q and Z are orthogonal matrices, P is an upper triangular matrix, and S is a quasi-triangular matrix with 1-by-1 and 2-by-2 diagonal blocks.
The 1-by-1 blocks correspond to real eigenvalues of the matrix pair (H,T), and the 2-by-2 blocks correspond to complex conjugate pairs of eigenvalues.
Additionally, the 2-by-2 upper triangular diagonal blocks of P corresponding to 2-by-2 blocks of S are reduced to positive diagonal form, i.e., if S(j+1,j) is non-zero, then P(j+1,j) = P(j,j+1) = 0, P(j,j) > 0, and P(j+1,j+1) > 0.
Optionally, the orthogonal matrix Q from the generalized Schur factorization may be postmultiplied into an input matrix Q1, and the orthogonal matrix Z may be postmultiplied into an input matrix Z1. If Q1 and Z1 are the orthogonal matrices from DGGHRD that reduced the matrix pair (A,B) to generalized upper Hessenberg form, then the output matrices Q1*Q and Z1*Z are the orthogonal factors from the generalized Schur factorization of (A,B):
A = (Q1*Q)*S*(Z1*Z)**T, B = (Q1*Q)*P*(Z1*Z)**T.
To avoid overflow, eigenvalues of the matrix pair (H,T) (equivalently, of (A,B)) are computed as a pair of values (alpha,beta), where alpha is complex and beta real. If beta is nonzero, then lambda = alpha / beta is an eigenvalue of the generalized nonsymmetric eigenvalue problem (GNEP)
A*x = lambda*B*x
and if alpha is nonzero, then mu = beta / alpha is an eigenvalue of the alternate form of the GNEP
mu*A*y = B*y.
Real eigenvalues can be read directly from the generalized Schur form: alpha = S(i,i), beta = P(i,i).
Reference, exactly: C.B. Moler & G.W. Stewart, , SIAM J. Numer. Anal., 10(1973), pp. 241--256.
π Parameters π
JOBβJOBisCHARACTER*1.= 'E': compute eigenvalues only;= 'S': compute eigenvalues and the Schur form.
COMPQβCOMPQisCHARACTER*1.= 'N': left Schur vectors (Q) are not computed;= 'I':Qis initialized to the unit matrix and the matrixQof left Schur vectors of(H,T)is returned;= 'V':Qmust contain an orthogonal matrixQ1on entry and the productQ1*Qis returned.
COMPZβCOMPZisCHARACTER*1.= 'N': right Schur vectors (Z) are not computed;= 'I':Zis initialized to the unit matrix and the matrixZof right Schur vectors of(H,T)is returned;= 'V':Zmust contain an orthogonal matrixZ1on entry and the productZ1*Zis returned.
NβNisINTEGER. The order of the matricesH,T,Q, andZ.N >= 0.ILOβILOisINTEGER.IHIβIHIisINTEGER.ILOandIHImark the rows and columns ofHwhich are in Hessenberg form. It is assumed thatAis already upper triangular in rows and columns1:ILO-1andIHI+1:N. IfN > 0,1 <= ILO <= IHI <= N; ifN = 0,ILO=1andIHI=0.HβHis aDOUBLE PRECISIONarray, dimension(LDH, N).- On entry, the
N-by-Nupper Hessenberg matrixH. - On exit, if
JOB = 'S',Hcontains the upper quasi-triangular matrixSfrom the generalized Schur factorization. - If
JOB = 'E', the diagonal blocks ofHmatch those ofS, but the rest ofHis unspecified.
- On entry, the
LDHβLDHisINTEGER. The leading dimension of the arrayH.LDH >= max( 1, N ).TβTis aDOUBLE PRECISIONarray, dimension(LDT, N).- On entry, the
N-by-Nupper triangular matrixT. - On exit, if
JOB = 'S',Tcontains the upper triangular matrixPfrom the generalized Schur factorization; 2-by-2 diagonal blocks ofPcorresponding to 2-by-2 blocks ofSare reduced to positive diagonal form, i.e., ifH(j+1,j)is non-zero, thenT(j+1,j) = T(j,j+1) = 0,T(j,j) > 0, andT(j+1,j+1) > 0. - If
JOB = 'E', the diagonal blocks ofTmatch those ofP, but the rest ofTis unspecified.
- On entry, the
LDTβLDTisINTEGER. The leading dimension of the arrayT.LDT >= max( 1, N ).ALPHARβALPHARis aDOUBLE PRECISIONarray, dimension(N). The real parts of each scalaralphadefining an eigenvalue of GNEP.ALPHAIβALPHAIis aDOUBLE PRECISIONarray, 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βBETAis aDOUBLE PRECISIONarray, dimension(N). The scalarsbetathat define the eigenvalues of GNEP. Together, the quantitiesalpha = (ALPHAR(j),ALPHAI(j))andbeta = BETA(j)represent thej-th eigenvalue of the matrix pair(A,B), in one of the formslambda = alpha/betaormu = beta/alpha. Since eitherlambdaormumay overflow, they should not, in general, be computed.QβQis aDOUBLE PRECISIONarray, dimension(LDQ, N).- On entry, if
COMPQ = 'V', the orthogonal matrixQ1used in the reduction of(A,B)to generalized Hessenberg form. - On exit, if
COMPQ = 'I', the orthogonal matrix of left Schur vectors of(H,T), and ifCOMPQ = 'V', the orthogonal matrix of left Schur vectors of(A,B). - Not referenced if
COMPQ = 'N'.
- On entry, if
LDQβLDQisINTEGER. The leading dimension of the arrayQ.LDQ >= 1. IfCOMPQ='V'or'I', thenLDQ >= N.ZβZis aDOUBLE PRECISIONarray, dimension(LDZ, N).- On entry, if
COMPZ = 'V', the orthogonal matrixZ1used in the reduction of(A,B)to generalized Hessenberg form. - On exit, if
COMPZ = 'I', the orthogonal matrix of right Schur vectors of(H,T), and ifCOMPZ = 'V', the orthogonal matrix of right Schur vectors of(A,B). - Not referenced if
COMPZ = 'N'.
- On entry, if
LDZβLDZisINTEGER. The leading dimension of the arrayZ.LDZ >= 1. IfCOMPZ='V'or'I', thenLDZ >= N.WORKβWORKis aDOUBLE PRECISIONarray, dimension(MAX(1,LWORK)). On exit, ifINFO >= 0,WORK(1)returns the optimalLWORK.LWORKβLWORKisINTEGER. The dimension of the arrayWORK.LWORK >= max(1,N).- 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.
- If
INFOβINFOisINTEGER.= 0: successful exit< 0: ifINFO = -i, thei-th argument had an illegal value= 1,...,N: the QZ iteration did not converge.(H,T)is not in Schur form, butALPHAR(i),ALPHAI(i), andBETA(i),i=INFO+1,...,Nshould be correct.= N+1,...,2*N: the shift calculation failed.(H,T)is not in Schur form, butALPHAR(i),ALPHAI(i), andBETA(i),i=INFO-N+1,...,Nshould be correct.
π Author π
The authors are:
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π¦ Further Details π¦
Iteration counters, bestie:
JITERβ counts iterations.IITERβ counts iterations run sinceILASTwas last changed. This is therefore reset only when a 1-by-1 or 2-by-2 block deflates off the bottom.
Definition at line 301 of file dhgeqz.f.
π Author π
Generated automatically by Doxygen for LAPACK from the source code.
Alright bestie, thatβs the whole page. Footer tea: LAPACK Version 3.12.0, source/page SRC/dhgeqz.f(3). No separate date is printed in that footer, so Iβm not inventing one β periodt πβ¨π
π¦ 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