SRC/shseqr.f(3)
π NAME π
SRC/shseqr.f β okay so this page is from the Library Functions Manual, and it's giving full main-character energy for the SHSEQR routine. Consider this your bestie-approved map of every single argument, ngl. β¨
β¨ SYNOPSIS β¨
π§ Functions/Subroutines π§
subroutine shseqr (job, compz, n, ilo, ihi, h, ldh, wr, wi, z, ldz,
work, lwork, info)
SHSEQR
π«Ά Function/Subroutine Documentation π«Ά
π
subroutine shseqr π
subroutine shseqr (character job, character compz, integer n, integer ilo,
integer ihi, real, dimension( ldh, * ) h, integer ldh, real, dimension(
* ) wr, real, dimension( * ) wi, real, dimension( ldz, * ) z, integer
ldz, real, dimension( * ) work, integer lwork, integer info)
SHSEQR
π SHSEQR π
π― Purpose π―
Okay bestie, here's the vibe: SHSEQR computes the eigenvalues of a Hessenberg matrix H and, optionally, the matrices T and Z from the Schur decomposition H = Z T Z**T, where T is an upper quasi-triangular matrix (the Schur form), and Z is the orthogonal matrix of Schur vectors. π
Optionally Z may be postmultiplied into an input orthogonal matrix Q so that this routine can give the Schur factorization of a matrix A which has been reduced to the Hessenberg form H by the orthogonal matrix Q: A = Q*H*Q**T = (QZ)*T*(QZ)**T. Periodt. π¦
π§© Parameters π§©
JOBβJOB is CHARACTER*1'E': compute eigenvalues only;'S': compute eigenvalues and the Schur formT.
COMPZβCOMPZ is CHARACTER*1'N': no Schur vectors are computed;'I':Zis initialized to the unit matrix and the matrixZof Schur vectors ofHis returned;'V':Zmust contain an orthogonal matrixQon entry, and the productQ*Zis returned.
NβN is INTEGER. The order of the matrixH.N >= 0.ILOβILO is INTEGER.IHIβIHI is INTEGER. It is assumed thatHis already upper triangular in rows and columns1:ILO-1andIHI+1:N.ILOandIHIare normally set by a previous call toSGEBAL, and then passed toZGEHRDwhen the matrix output bySGEBALis reduced to Hessenberg form. OtherwiseILOandIHIshould be set to1andNrespectively. IfN > 0, then1 <= ILO <= IHI <= N. IfN = 0, thenILO = 1andIHI = 0.HβH is REAL array, dimension (LDH,N). On entry, the upper Hessenberg matrixH. On exit, ifINFO = 0andJOB = 'S', thenHcontains the upper quasi-triangular matrixTfrom the Schur decomposition (the Schur form);2-by-2diagonal blocks (corresponding to complex conjugate pairs of eigenvalues) are returned in standard form, withH(i,i) = H(i+1,i+1)andH(i+1,i)*H(i,i+1) < 0. IfINFO = 0andJOB = 'E', the contents ofHare unspecified on exit. (The output value ofHwhenINFO > 0is given under the description ofINFObelow.) Unlike earlier versions ofSHSEQR, this subroutine may explicitly makeH(i,j) = 0fori > jandj = 1, 2, ... ILO-1orj = IHI+1, IHI+2, ... N.LDHβLDH is INTEGER. The leading dimension of the arrayH.LDH >= max(1,N).WRβWR is REAL array, dimension (N).WIβWI is REAL array, dimension (N). The real and imaginary parts, respectively, of the computed eigenvalues. If two eigenvalues are computed as a complex conjugate pair, they are stored in consecutive elements ofWRandWI, say thei-th and(i+1)th, withWI(i) > 0andWI(i+1) < 0. IfJOB = 'S', the eigenvalues are stored in the same order as on the diagonal of the Schur form returned inH, withWR(i) = H(i,i)and, ifH(i:i+1,i:i+1)is a2-by-2diagonal block,WI(i) = sqrt(-H(i+1,i)*H(i,i+1))andWI(i+1) = -WI(i).ZβZ is REAL array, dimension (LDZ,N). IfCOMPZ = 'N',Zis not referenced. IfCOMPZ = 'I', on entryZneed not be set and on exit, ifINFO = 0,Zcontains the orthogonal matrixZof the Schur vectors ofH. IfCOMPZ = 'V', on entryZmust contain anN-by-NmatrixQ, which is assumed to be equal to the unit matrix except for the submatrixZ(ILO:IHI,ILO:IHI). On exit, ifINFO = 0,ZcontainsQ*Z. NormallyQis the orthogonal matrix generated bySORGHRafter the call toSGEHRDwhich formed the Hessenberg matrixH. (The output value ofZwhenINFO > 0is given under the description ofINFObelow.)LDZβLDZ is INTEGER. The leading dimension of the arrayZ. ifCOMPZ = 'I'orCOMPZ = 'V', thenLDZ >= MAX(1,N). Otherwise,LDZ >= 1.WORKβWORK is REAL array, dimension (LWORK). On exit, ifINFO = 0,WORK(1)returns an estimate of the optimal value forLWORK.LWORKβLWORK is INTEGER. The dimension of the arrayWORK.LWORK >= max(1,N)is sufficient and delivers very good and sometimes optimal performance. However,LWORKas large as11*Nmay be required for optimal performance. A workspace query is recommended to determine the optimal workspace size. IfLWORK = -1, thenSHSEQRdoes a workspace query. In this case,SHSEQRchecks the input parameters and estimates the optimal workspace size for the given values ofN,ILOandIHI. The estimate is returned inWORK(1). No error message related toLWORKis issued byXERBLA. NeitherHnorZare accessed.INFOβINFO is INTEGER= 0: successful exit< 0: ifINFO = -i, thei-th argument had an illegal value> 0: ifINFO = i,SHSEQRfailed to compute all of the eigenvalues. Elements1:ilo-1andi+1:nofWRandWIcontain those eigenvalues which have been successfully computed. (Failures are rare.)- If
INFO > 0andJOB = 'E', then on exit, the remaining unconverged eigenvalues are the eigenvalues of the upper Hessenberg matrix rows and columnsILOthroughINFOof the final, output value ofH. - If
INFO > 0andJOB = 'S', then on exit(*) (initial value of H)*U = U*(final value of H)whereUis an orthogonal matrix. The final value ofHis upper Hessenberg and quasi-triangular in rows and columnsINFO+1throughIHI. - If
INFO > 0andCOMPZ = 'V', then on exit(final value of Z) = (initial value of Z)*UwhereUis the orthogonal matrix in(*)(regardless of the value ofJOB.) - If
INFO > 0andCOMPZ = 'I', then on exit(final value of Z) = UwhereUis the orthogonal matrix in(*)(regardless of the value ofJOB.) - If
INFO > 0andCOMPZ = 'N', thenZis not accessed.
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π Contributors π
Karen Braman and Ralph Byers, Department of Mathematics, University of Kansas, USA
π Further Details π
Default values come from ILAENV(ISPEC,'SHSEQR',JOB(:1)//COMPZ(:1),N,ILO,IHI,LWORK). β¨ It is suggested that these defaults be adjusted in order to attain best performance in each particular computational environment β basically, tune the vibe per machine, bestie. π
ISPEC=12β TheSLAHQRvsSLAQR0crossover point. Default:75. (Must be at least11.) π₯ISPEC=13β Recommended deflation window size. This depends onILO,IHIandNS.NSis the number of simultaneous shifts returned byILAENV(ISPEC=15). (SeeISPEC=15below.) The default for(IHI-ILO+1) <= 500isNS. The default for(IHI-ILO+1) > 500is3*NS/2. πISPEC=14β Nibble crossover point. (SeeIPARMQfor details.) Default:14%of deflation window size. πISPEC=15β Number of simultaneous shifts in a multishift QR iteration. π
If IHI-ILO+1 is greater than or equal to the first value but less than the second, the default is:
1to< 30βNS = 2(+)30to< 60βNS = 4(+)60to< 150βNS = 10(+)150to< 590βNS = **590to< 3000βNS = 643000to< 6000βNS = 1286000to< infinityβNS = 256(+)By default some or all matrices of this order are passed to the implicit double shift routineSLAHQRand this parameter is ignored. SeeISPEC=12above and comments inIPARMQfor details. π(**)The asterisks (**) indicate an ad-hoc function ofNincreasing from10to64. πISPEC=16β Select structured matrix multiply. If the number of simultaneous shifts (specified byISPEC=15) is less than14, then the default forISPEC=16is0. Otherwise the default forISPEC=16is2. π
π References π
- K. Braman, R. Byers and R. Mathias, The Multi-Shift QR Algorithm Part I: Maintaining Well Focused Shifts, and Level 3 Performance, SIAM Journal of Matrix Analysis, volume 23, pages 929--947, 2002. π
- K. Braman, R. Byers and R. Mathias, The Multi-Shift QR Algorithm Part II: Aggressive Early Deflation, SIAM Journal of Matrix Analysis, volume 23, pages 948--973, 2002. π
π Definition at line 314 of file shseqr.f.
π Author π
Generated automatically by Doxygen for LAPACK from the source code. periodt. π
Footer cuteness: LAPACK Version 3.12.0 β’ SRC/shseqr.f(3) β source + version are exactly as printed, and thereβs no separate date in this footer, so no fake date energy here. π«Ά
π¦ 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