laqr4(3)
π¦ laqr4(3) β Library Functions Manual π¦
okay so bestie, welcome to laqr4(3) β this is part of the Library Functions Manual, and it's basically the group chat of LAPACK's Hessenberg-eigenvalue subroutines: four of them, all matching, all doing the Schur thing. Pull up a chair, we're going in π
β¨ NAME β¨
laqr4βlaqr4: eig of Hessenberg, step in hseqr
like, that's the whole vibe: eigenvalues of a Hessenberg matrix, one step in hseqr. iconic.
π SYNOPSIS π
π« Functions
claqr4β complex flavor π
subroutine claqr4 (wantt, wantz, n, ilo, ihi, h, ldh, w, iloz, ihiz, z,
ldz, work, lwork, info)
CLAQR4 computes the eigenvalues of a Hessenberg matrix, and optionally the matrices from the Schur decomposition.
dlaqr4β double precision flavor π
subroutine dlaqr4 (wantt, wantz, n, ilo, ihi, h, ldh, wr, wi, iloz,
ihiz, z, ldz, work, lwork, info)
DLAQR4 computes the eigenvalues of a Hessenberg matrix, and optionally the matrices from the Schur decomposition.
slaqr4β single precision flavor πΈ
subroutine slaqr4 (wantt, wantz, n, ilo, ihi, h, ldh, wr, wi, iloz,
ihiz, z, ldz, work, lwork, info)
SLAQR4 computes the eigenvalues of a Hessenberg matrix, and optionally the matrices from the Schur decomposition.
zlaqr4β double complex flavor π
subroutine zlaqr4 (wantt, wantz, n, ilo, ihi, h, ldh, w, iloz, ihiz, z,
ldz, work, lwork, info)
ZLAQR4 computes the eigenvalues of a Hessenberg matrix, and optionally the matrices from the Schur decomposition.
π Detailed Description π
okay so literally nothing here β this section is empty in the source. she's a placeholder. we respect her privacy π«Ά
π₯ Function Documentation π₯
π§ subroutine claqr4
subroutine claqr4 (logical wantt, logical wantz, integer n, integer ilo,
integer ihi, complex, dimension( ldh, * ) h, integer ldh, complex,
dimension( * ) w, integer iloz, integer ihiz, complex, dimension( ldz, *
) z, integer ldz, complex, dimension( * ) work, integer lwork, integer
info)
CLAQR4 computes the eigenvalues of a Hessenberg matrix, and optionally the matrices from the Schur decomposition.
π Purpose
CLAQR4 implements one level of recursion for CLAQR0. It is a complete implementation of the small bulge multi-shift QR algorithm. It may be called by CLAQR0 and, for large enough deflation window size, it may be called by CLAQR3. This subroutine is identical to CLAQR0 except that it calls CLAQR2 instead of CLAQR3.
CLAQR4 computes the eigenvalues of a Hessenberg matrix H and, optionally, the matrices T and Z from the Schur decomposition
H = Z T Z**H
where T is an upper triangular matrix (the Schur form), and Z is the unitary matrix of Schur vectors.
Optionally Z may be postmultiplied into an input unitary 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 unitary matrix Q:
A = Q*H*Q**H = (QZ)*H*(QZ)**H
β¨ the way this routine just hands you the whole factorization, no cap.
πΈ Parameters
WANTTβWANTTisLOGICAL.= .TRUE.: the full Schur formTis required;= .FALSE.: only eigenvalues are required.
WANTZβWANTZisLOGICAL.= .TRUE.: the matrix of Schur vectorsZis required;= .FALSE.: Schur vectors are not required.
NβNisINTEGER. The order of the matrixH.N >= 0.ILOβILOisINTEGER. (that's it, that's the description π β no extra notes here, bestie, she's self-explanatory apparently)IHIβIHIisINTEGER. It is assumed thatHis already upper triangular in rows and columns1:ILO-1andIHI+1:Nand, ifILO > 1,H(ILO,ILO-1)is zero.ILOandIHIare normally set by a previous call toCGEBAL, and then passed toCGEHRDwhen the matrix output byCGEBALis reduced to Hessenberg form. Otherwise,ILOandIHIshould be set to1andN, respectively. IfN > 0, then1 <= ILO <= IHI <= N. IfN = 0, thenILO = 1andIHI = 0.HβHisCOMPLEXarray, dimension(LDH,N).- On entry, the upper Hessenberg matrix
H. - On exit, if
INFO = 0andWANTTis.TRUE., thenHcontains the upper triangular matrixTfrom the Schur decomposition (the Schur form). - If
INFO = 0andWANTis.FALSE., then the contents ofHare unspecified on exit. (the output value ofHwhenINFO > 0is given under the description ofINFObelow.) - This subroutine may explicitly set
H(i,j) = 0fori > jandj = 1, 2, ... ILO-1orj = IHI+1, IHI+2, ... N.
- On entry, the upper Hessenberg matrix
LDHβLDHisINTEGER. The leading dimension of the arrayH.LDH >= max(1,N).WβWisCOMPLEXarray, dimension(N). The computed eigenvalues ofH(ILO:IHI,ILO:IHI)are stored inW(ILO:IHI). IfWANTTis.TRUE., then the eigenvalues are stored in the same order as on the diagonal of the Schur form returned inH, withW(i) = H(i,i).ILOZβILOZisINTEGER. (again, no notes attached β matching energy π)IHIZβIHIZisINTEGER. Specify the rows ofZto which transformations must be applied ifWANTZis.TRUE..1 <= ILOZ <= ILO;IHI <= IHIZ <= N.ZβZisCOMPLEXarray, dimension(LDZ,IHI).- If
WANTZis.FALSE., thenZis not referenced. - If
WANTZis.TRUE., thenZ(ILO:IHI,ILOZ:IHIZ)is replaced byZ(ILO:IHI,ILOZ:IHIZ)*UwhereUis the orthogonal Schur factor ofH(ILO:IHI,ILO:IHI). (the output value ofZwhenINFO > 0is given under the description ofINFObelow.)
- If
LDZβLDZisINTEGER. The leading dimension of the arrayZ. ifWANTZis.TRUE.thenLDZ >= MAX(1,IHIZ). Otherwise,LDZ >= 1.WORKβWORKisCOMPLEXarray, dimensionLWORK. On exit, ifLWORK = -1,WORK(1)returns an estimate of the optimal value forLWORK.LWORKβLWORKisINTEGER. The dimension of the arrayWORK.LWORK >= max(1,N)is sufficient, butLWORKtypically as large as6*Nmay be required for optimal performance. A workspace query to determine the optimal workspace size is recommended.- If
LWORK = -1, thenCLAQR4does a workspace query. In this case,CLAQR4checks 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βINFOisINTEGER.= 0: successful exit π> 0: ifINFO = i,CLAQR4failed to compute all of the eigenvalues. Elements1:ilo-1andi+1:nofWRandWIcontain those eigenvalues which have been successfully computed. (Failures are rare.)- If
INFO > 0andWANTis.FALSE., 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 > 0andWANTTis.TRUE., then on exit
(*) (initial value of H)*U = U*(final value of H)
where U is a unitary matrix. The final value of H is upper Hessenberg and triangular in rows and columns INFO+1 through IHI.
- If
INFO > 0andWANTZis.TRUE., then on exit
(final value of Z(ILO:IHI,ILOZ:IHIZ)
= (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U
where U is the unitary matrix in (*) (regardless of the value of WANTT.)
- If
INFO > 0andWANTZis.FALSE., thenZis not accessed.
π reminder bestie: whenINFO > 0stuff is only partially converged, andH/Zcome back in a very specific state. read the bullet you need, don't skim.
π 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
π 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 246 of file claqr4.f.
π subroutine dlaqr4
subroutine dlaqr4 (logical wantt, logical wantz, integer n, integer ilo,
integer ihi, double precision, dimension( ldh, * ) h, integer ldh,
double precision, dimension( * ) wr, double precision, dimension( * )
wi, integer iloz, integer ihiz, double precision, dimension( ldz, * ) z,
integer ldz, double precision, dimension( * ) work, integer lwork,
integer info)
DLAQR4 computes the eigenvalues of a Hessenberg matrix, and optionally the matrices from the Schur decomposition.
π Purpose
DLAQR4 implements one level of recursion for DLAQR0. It is a complete implementation of the small bulge multi-shift QR algorithm. It may be called by DLAQR0 and, for large enough deflation window size, it may be called by DLAQR3. This subroutine is identical to DLAQR0 except that it calls DLAQR2 instead of DLAQR3.
DLAQR4 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
πΈ note the glow-up fromclaqr4: this one's real, so it'sZ**TnotZ**H, andTis quasi-triangular. same energy, different dtype.
β Parameters
WANTTβWANTTisLOGICAL.= .TRUE.: the full Schur formTis required;= .FALSE.: only eigenvalues are required.
WANTZβ (...and that's exactly where this part of the page cuts off β the rest ofWANTZand every parameter after it is waiting for you in part 2 π)
WANTZβWANTZ is LOGICAL. Bestie, this is the βdo I want the Schur vectors?β switch.= .TRUE.: the matrix of Schur vectorsZis required;= .FALSE.: Schur vectors are not required.
NβN is INTEGER. The order of the matrixH.N >= 0. Math girlies stay winning.ILOβILO is INTEGER. No extra lore here, it just exists.IHIβIHI is INTEGER. Okay so hereβs the tea: itβs assumed thatHis already upper triangular in rows and columns1:ILO-1andIHI+1:N, and ifILO > 1, thenH(ILO,ILO-1)is zero.ILOandIHIare normally set by a previous call toDGEBAL, and then passed toDGEHRDwhen the matrix output byDGEBALis reduced to Hessenberg form. Otherwise,ILOandIHIshould be set to1andN, respectively. IfN > 0, then1 <= ILO <= IHI <= N. IfN = 0, thenILO = 1andIHI = 0. Precision, periodt.HβH is DOUBLE PRECISION array, dimension (LDH,N). On entry, the upper Hessenberg matrixH. On exit, ifINFO = 0andWANTTis.TRUE., thenHcontains the upper quasi-triangular matrixTfrom the Schur decomposition (the Schur form); 2-by-2 diagonal 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 = 0andWANTTis.FALSE., then the contents ofHare unspecified on exit. (The output value ofHwhenINFO > 0is given under the description ofINFObelow.) This subroutine may explicitly setH(i,j) = 0fori > jandj = 1, 2, ... ILO-1orj = IHI+1, IHI+2, ... N. Itβs giving βI contain multitudes and also maybe zeros.βLDHβLDH is INTEGER. The leading dimension of the arrayH.LDH >= max(1,N). Respect the leading dimension or else.WRβWR is DOUBLE PRECISION array, dimension (IHI). Real parts go here, bestie.WIβWI is DOUBLE PRECISION array, dimension (IHI). The real and imaginary parts, respectively, of the computed eigenvalues ofH(ILO:IHI,ILO:IHI)are stored inWR(ILO:IHI)andWI(ILO:IHI). 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. IfWANTTis.TRUE., then 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 a 2-by-2 diagonal block,WI(i) = sqrt(-H(i+1,i)*H(i,i+1))andWI(i+1) = -WI(i). Complex conjugate couples stay adjacent, thatβs the rule.ILOZβILOZ is INTEGER. Short and sweet.IHIZβIHIZ is INTEGER. Specify the rows ofZto which transformations must be applied ifWANTZis.TRUE..1 <= ILOZ <= ILO; IHI <= IHIZ <= N. Bounds check slay.ZβZ is DOUBLE PRECISION array, dimension (LDZ,IHI). IfWANTZis.FALSE., thenZis not referenced. IfWANTZis.TRUE., thenZ(ILO:IHI,ILOZ:IHIZ)is replaced byZ(ILO:IHI,ILOZ:IHIZ)*UwhereUis the orthogonal Schur factor ofH(ILO:IHI,ILO:IHI). (The output value ofZwhenINFO > 0is given under the description ofINFObelow.) The Schur vectors are literally having their main character moment.LDZβLDZ is INTEGER. The leading dimension of the arrayZ. IfWANTZis.TRUE.thenLDZ >= MAX(1,IHIZ). Otherwise,LDZ >= 1. Donβt skip this or the vibes will be off.WORKβWORK is DOUBLE PRECISION array, dimension LWORK. On exit, ifLWORK = -1,WORK(1)returns an estimate of the optimal value forLWORK. Workspace query era.LWORKβLWORK is INTEGER. The dimension of the arrayWORK.LWORK >= max(1,N)is sufficient, butLWORKtypically as large as6*Nmay be required for optimal performance. A workspace query to determine the optimal workspace size is recommended. IfLWORK = -1, thenDLAQR4does a workspace query. In this case,DLAQR4checks 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. No cap, the query mode is iconic.INFOβINFO is INTEGER.= 0: successful exit;> 0: ifINFO = i,DLAQR4failed to compute all of the eigenvalues. Elements1:ilo-1andi+1:nofWRandWIcontain those eigenvalues which have been successfully computed. (Failures are rare.) Rare, but not never, so pay attention.
If INFO > 0 and WANT is .FALSE., then on exit, the remaining unconverged eigenvalues are the eigen-values of the upper Hessenberg matrix rows and columns ILO through INFO of the final, output value of H.
If INFO > 0 and WANTT is .TRUE., then on exit
(*) (initial value of H)*U = U*(final value of H)
where U is an orthogonal matrix. The final value of H is upper Hessenberg and triangular in rows and columns INFO+1 through IHI.
If INFO > 0 and WANTZ is .TRUE., then on exit
(final value of Z(ILO:IHI,ILOZ:IHIZ)
= (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U
where U is the orthogonal matrix in (*) (regardless of the value of WANTT.)
If INFO > 0 and WANTZ is .FALSE., then Z is not accessed. Leave Z alone, it said no.
π 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
π 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 261 of file dlaqr4.f.
π¦ subroutine slaqr4 π¦
subroutine slaqr4 (logical wantt, logical wantz, integer n, integer ilo,
integer ihi, real, dimension( ldh, * ) h, integer ldh, real, dimension(
* ) wr, real, dimension( * ) wi, integer iloz, integer ihiz, real,
dimension( ldz, * ) z, integer ldz, real, dimension( * ) work, integer
lwork, integer info)
SLAQR4 computes the eigenvalues of a Hessenberg matrix, and optionally the matrices from the Schur decomposition. Another one, and yes sheβs also booked and busy.
β¨ Purpose β¨
SLAQR4 implements one level of recursion for SLAQR0. It is a complete implementation of the small bulge multi-shift QR algorithm. It may be called by SLAQR0 and, for large enough deflation window size, it may be called by SLAQR3. This subroutine is identical to SLAQR0 except that it calls SLAQR2 instead of SLAQR3.
SLAQR4 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. Factorization but make it fashion.
π Parameters π
WANTTβWANTT is LOGICAL= .TRUE.: the full Schur formTis required;= .FALSE.: only eigenvalues are required. Choose your fighter.
WANTZβWANTZ is LOGICAL= .TRUE.: the matrix of Schur vectorsZis required;= .FALSE.: Schur vectors are not required.
NβN is INTEGER. The order of the matrixH.N >= 0. Same energy as before, but now in single precision land.ILOβILO is INTEGER. Still just vibing.IHIβIHI is INTEGER. It is assumed thatHis already upper triangular in rows and columns1:ILO-1andIHI+1:Nand, ifILO > 1,H(ILO,ILO-1)is zero.ILOandIHIare normally set by a previous call toSGEBAL, and then passed toSGEHRDwhen the matrix output bySGEBALis reduced to Hessenberg form. Otherwise,ILOandIHIshould be set to1andN, respectively. IfN > 0, then1 <= ILO <= IHI <= N. IfN = 0, thenILO = 1andIHI = 0. Notice the S inSGEBALandSGEHRDβ weβre in REAL mode, bestie.HβH is REAL array, dimension (LDH,N). On entry, the upper Hessenberg matrixH. On exit, ifINFO = 0andWANTTis.TRUE., thenHcontains the upper quasi-triangular matrixTfrom the Schur decomposition (the Schur form); 2-by-2 diagonal 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 = 0andWANTTis.FALSE., then the contents ofHare unspecified on exit. (The output value ofHwhenINFO > 0is given under the description ofINFObelow.) This subroutine may explicitly setH(i,j) = 0fori > jandj = 1, 2, ... ILO-1orj = IHI+1, IHI+2, ... N. REAL array, real consequences.LDHβLDH is INTEGER. The leading dimension of the arrayH.LDH >= max(1,N). Leading dimension stays undefeated.WRβREALarray, dimension(IHI). Short and sweet, no notes. πWIβREALarray, dimension(IHI). Okay, this one is carrying the whole imaginary agenda: the real and imaginary parts, respectively, of the computed eigenvalues ofH(ILO:IHI,ILO:IHI)are stored inWR(ILO:IHI)andWI(ILO:IHI). If two eigenvalues are computed as a complex conjugate pair, they are stored in consecutive elements ofWRandWI, say the i-th and (i+1)th, withWI(i) > 0andWI(i+1) < 0. IfWANTTis.TRUE., then 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 a 2-by-2 diagonal block,WI(i) = sqrt(-H(i+1,i)*H(i,i+1))andWI(i+1) = -WI(i). Iconic behavior, honestly. Periodt. β¨ILOZβINTEGER. That's the whole entry. Iykyk.IHIZβINTEGER. Specify the rows ofZto which transformations must be applied ifWANTZis.TRUE..1 <= ILOZ <= ILO;IHI <= IHIZ <= N. Read the bounds twice, bestie.ZβREALarray, dimension(LDZ,IHI). IfWANTZis.FALSE., thenZis not referenced. IfWANTZis.TRUE., thenZ(ILO:IHI,ILOZ:IHIZ)is replaced byZ(ILO:IHI,ILOZ:IHIZ)*UwhereUis the orthogonal Schur factor ofH(ILO:IHI,ILO:IHI). (The output value ofZwhenINFO > 0is given under the description ofINFObelow.) No cap, that parenthetical matters.LDZβINTEGER. The leading dimension of the arrayZ. ifWANTZis.TRUE.thenLDZ >= MAX(1,IHIZ). Otherwise,LDZ >= 1. Lowercase "if" is canon, don't come for me.WORKβREALarray, dimensionLWORK. On exit, ifLWORK = -1,WORK(1)returns an estimate of the optimal value forLWORK. Workspace query girlies rise.LWORKβINTEGER. The dimension of the arrayWORK.LWORK >= max(1,N)is sufficient, butLWORKtypically as large as6*Nmay be required for optimal performance. A workspace query to determine the optimal workspace size is recommended.
If LWORK = -1, then SLAQR4 does a workspace query. In this case, SLAQR4 checks the input parameters and estimates the optimal workspace size for the given values of N, ILO and IHI. The estimate is returned in WORK(1). No error message related to LWORK is issued by XERBLA. Neither H nor Z are accessed. So if you're just querying, bestie, nothing gets touched.
INFOβINTEGER. The full breakdown is literally:
INFO is INTEGER
= 0: successful exit
> 0: if INFO = i, SLAQR4 failed to compute all of
the eigenvalues. Elements 1:ilo-1 and i+1:n of WR
and WI contain those eigenvalues which have been
successfully computed. (Failures are rare.)
If INFO > 0 and WANT is .FALSE., then on exit,
the remaining unconverged eigenvalues are the eigen-
values of the upper Hessenberg matrix rows and
columns ILO through INFO of the final, output
value of H.
If INFO > 0 and WANTT is .TRUE., then on exit
(*) (initial value of H)*U = U*(final value of H)
where U is a orthogonal matrix. The final
value of H is upper Hessenberg and triangular in
rows and columns INFO+1 through IHI.
If INFO > 0 and WANTZ is .TRUE., then on exit
(final value of Z(ILO:IHI,ILOZ:IHIZ)
= (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U
where U is the orthogonal matrix in (*) (regard-
less of the value of WANTT.)
If INFO > 0 and WANTZ is .FALSE., then Z is not
accessed.
π Author
Univ. of TennesseeUniv. of California BerkeleyUniv. of Colorado DenverNAG Ltd.
Shoutout to the institutions.
π Contributors
Karen Braman and Ralph Byers, Department of Mathematics, University of Kansas, USA.
π 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 263 of file slaqr4.f.
subroutine zlaqr4 (logical wantt, logical wantz, integer n, integer ilo,
integer ihi, complex*16, dimension( ldh, * ) h, integer ldh, complex*16,
dimension( * ) w, integer iloz, integer ihiz, complex*16, dimension(
ldz, * ) z, integer ldz, complex*16, dimension( * ) work, integer lwork,
integer info)
ZLAQR4 computes the eigenvalues of a Hessenberg matrix, and optionally the matrices from the Schur decomposition. Main character subroutine energy.
π― Purpose
ZLAQR4 implements one level of recursion for ZLAQR0. It is a complete implementation of the small bulge multi-shift QR algorithm. It may be called by ZLAQR0 and, for large enough deflation window size, it may be called by ZLAQR3. This subroutine is identical to ZLAQR0 except that it calls ZLAQR2 instead of ZLAQR3.
ZLAQR4 computes the eigenvalues of a Hessenberg matrix H and, optionally, the matrices T and Z from the Schur decomposition H = Z T Z**H, where T is an upper triangular matrix (the Schur form), and Z is the unitary matrix of Schur vectors.
Optionally Z may be postmultiplied into an input unitary 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 unitary matrix Q: A = Q*H*Q**H = (QZ)*H*(QZ)**H.
π§Ύ Parameters
WANTTβLOGICAL.= .TRUE. : the full Schur form T is required;= .FALSE.: only eigenvalues are required.Choose your fighter.WANTZβLOGICAL.= .TRUE. : the matrix of Schur vectors Z is required;= .FALSE.: Schur vectors are not required.Same vibe, different output.NβINTEGER. The order of the matrixH.N >= 0. Zero is allowed, bestie.ILOβINTEGER. That's it. The whole description. No extra lore.IHIβINTEGER. It is assumed thatHis already upper triangular in rows and columns1:ILO-1andIHI+1:Nand, ifILO > 1,H(ILO,ILO-1)is zero.ILOandIHIare normally set by a previous call toZGEBAL, and then passed toZGEHRDwhen the matrix output byZGEBALis reduced to Hessenberg form. Otherwise,ILOandIHIshould be set to1andN, respectively. IfN > 0, then1 <= ILO <= IHI <= N. IfN = 0, thenILO = 1andIHI = 0. This is the boundary tea, don't skip it.HβCOMPLEX*16array, dimension(LDH,N). On entry, the upper Hessenberg matrixH. On exit, ifINFO = 0andWANTTis.TRUE., thenHcontains the upper triangular matrixTfrom the Schur decomposition (the Schur form). IfINFO = 0andWANTis.FALSE., then the contents ofHare unspecified on exit. (The output value ofHwhenINFO > 0is given under the description ofINFObelow.)
This subroutine may explicitly set H(i,j) = 0 for i > j and j = 1, 2, ... ILO-1 or j = IHI+1, IHI+2, ... N. Yes, it can just zero those out. That's the note.
LDHβINTEGER. The leading dimension of the arrayH.LDH >= max(1,N). Respect the leading dimension.WβCOMPLEX*16array, dimension(N). The computed eigenvalues ofH(ILO:IHI,ILO:IHI)are stored inW(ILO:IHI). IfWANTTis.TRUE., then the eigenvalues are stored in the same order as on the diagonal of the Schur form returned inH, withW(i) = H(i,i). Eigenvalue storage, slay.ILOZβINTEGER. Again, that's the whole entry. Iykyk.IHIZβINTEGER. Specify the rows ofZto which transformations must be applied ifWANTZis.TRUE..1 <= ILOZ <= ILO;IHI <= IHIZ <= N. Bounds check, bestie.ZβCOMPLEX*16array, dimension(LDZ,IHI). IfWANTZis.FALSE., thenZis not referenced. IfWANTZis.TRUE., thenZ(ILO:IHI,ILOZ:IHIZ)is replaced byZ(ILO:IHI,ILOZ:IHIZ)*UwhereUis the orthogonal Schur factor ofH(ILO:IHI,ILO:IHI). (The output value ofZwhenINFO > 0is given under the description ofINFObelow.) Same parenthetical, same importance.LDZβINTEGER. The leading dimension of the arrayZ. ifWANTZis.TRUE.thenLDZ >= MAX(1,IHIZ). Otherwise,LDZ >= 1. Lowercase "if" again, we keep it exactly.WORKβCOMPLEX*16array, dimensionLWORK. On exit, ifLWORK = -1,WORK(1)returns an estimate of the optimal value forLWORK. Workspace query, but make it complex.LWORKLWORKβINTEGER, bestie, and it's the dimension of the arrayWORK. Here's the tea:LWORK >= max(1,N)is sufficient β that's the bare minimum, it'll work β but honestly?LWORKtypically needs to be as large as6*Nfor optimal performance. So if you want it to actually slay and not chug, size it up. A workspace query to figure out the optimal workspace size is recommended (do it, seriously, it's free real estate).
And if LWORK = -1, then ZLAQR4 does a workspace query. In that case, ZLAQR4 checks the input parameters and estimates the optimal workspace size for the given values of N, ILO and IHI. That estimate gets returned in WORK(1). No error message related to LWORK is issued by XERBLA. And neither H nor Z are accessed β like, at all. Just a little peek at your parameters, no touching the actual matrices π
INFOβINTEGER, the vibe report when it's all done:= 0: successful exit β¨> 0: ifINFO = i,ZLAQR4failed to compute all of the eigenvalues. Elements1:ilo-1andi+1:nofWRandWIcontain those eigenvalues which have been successfully computed. (Failures are rare. fr fr, extremely rare.)
And now the deets for the INFO > 0 situations, because they each hit different:
If INFO > 0 and WANT is .FALSE., then on exit, the remaining unconverged eigenvalues are the eigenvalues of the upper Hessenberg matrix rows and columns ILO through INFO of the final, output value of H.
If INFO > 0 and WANTT is .TRUE., then on exit
(*) (initial value of H)*U = U*(final value of H)
where U is a unitary matrix. The final value of H is upper Hessenberg and triangular in rows and columns INFO+1 through IHI.
If INFO > 0 and WANTZ is .TRUE., then on exit
(final value of Z(ILO:IHI,ILOZ:IHIZ)
= (initial value of Z(ILO:IHI,ILOZ:IHIZ)*U
where U is the unitary matrix in (*) (regardless of the value of WANTT β yeah, even then, iconic of it).
If INFO > 0 and WANTZ is .FALSE., then Z is not accessed. Not even looked at. Respectful distance π«Ά
πΈ 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
π 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.
Little note: those two references are literally split across parts I and II of the same paper, so if you're reading one, bestie, read both. iykyk π
Definition at line 245 of file zlaqr4.f.
π Author
Generated automatically by Doxygen for LAPACK from the source code. So like, a robot wrote this bit and we're just vibing with it π€π
That's the whole page, babe! And for the cute sign-off: this gorgeous thing is stamped <b>LAPACK, Version 3.12.0</b>, sitting pretty on the laqr4(3) footer line β go forth, size your LWORK, and slay π
β¨π¦
π¦ 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