lahqr(3)

πŸ’– NAME πŸ’–

okay so this is lahqr from section 3 of the library functions manual (yes bestie, lahqr(3), that's the manual name, noted πŸ“Œ) β€” and it's literally the eig-of-Hessenberg, step-in-hseqr situation. That's the whole name: lahqr: eig of Hessenberg, step in hseqr. Iconic, concise, no notes. πŸ‘‘


✨ SYNOPSIS ✨

🫢 Functions

  • subroutine clahqr (wantt, wantz, n, ilo, ihi, h, ldh, w, iloz, ihiz, z, ldz, info) β€” CLAHQR computes the eigenvalues and Schur factorization of an upper Hessenberg matrix, using the double-shift/single-shift QR algorithm.
  • subroutine dlahqr (wantt, wantz, n, ilo, ihi, h, ldh, wr, wi, iloz, ihiz, z, ldz, info) β€” DLAHQR computes the eigenvalues and Schur factorization of an upper Hessenberg matrix, using the double-shift/single-shift QR algorithm.
  • subroutine slahqr (wantt, wantz, n, ilo, ihi, h, ldh, wr, wi, iloz, ihiz, z, ldz, info) β€” SLAHQR computes the eigenvalues and Schur factorization of an upper Hessenberg matrix, using the double-shift/single-shift QR algorithm.
  • subroutine zlahqr (wantt, wantz, n, ilo, ihi, h, ldh, w, iloz, ihiz, z, ldz, info) β€” ZLAHQR computes the eigenvalues and Schur factorization of an upper Hessenberg matrix, using the double-shift/single-shift QR algorithm.
four flavors, one vibe: c = complex, d = double, s = single, z = the complex double one. pick your fighter πŸ’…

🌈 DETAILED DESCRIPTION 🌈

okay so there's a Detailed Description section and then the Function Documentation β€” and the function documentation is where it gets good, because every single routine gets the full breakdown. buckle up, we're going parameter by parameter, no skips, no summarizing, we eat the whole plate πŸ“


πŸ‘‘ FUNCTION DOCUMENTATION πŸ‘‘

πŸ¦‹ subroutine clahqr (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, integer info)

CLAHQR computes the eigenvalues and Schur factorization of an upper Hessenberg matrix, using the double-shift/single-shift QR algorithm.

πŸŽ€ Purpose:

!>
!>    CLAHQR is an auxiliary routine called by CHSEQR to update the
!>    eigenvalues and Schur decomposition already computed by CHSEQR, by
!>    dealing with the Hessenberg submatrix in rows and columns ILO to
!>    IHI.
!>

like, it's the little helper CHSEQR calls in to clean up the Hessenberg submatrix, rows and columns ILO through IHI. main character energy but make it supportive. 🫢

🌸 Parameters

  • WANTT β€” WANTT is LOGICAL. = .TRUE. : the full Schur form T is required; = .FALSE.: only eigenvalues are required.
  • WANTZ β€” WANTZ is LOGICAL. = .TRUE. : the matrix of Schur vectors Z is required; = .FALSE.: Schur vectors are not required.
  • N β€” N is INTEGER. The order of the matrix H. N >= 0.
  • ILO β€” ILO is INTEGER. (that's it, that's the description, she's mysterious πŸ™ˆ)
  • IHI β€” IHI is INTEGER. It is assumed that H is already upper triangular in rows and columns IHI+1:N, and that H(ILO,ILO-1) = 0 (unless ILO = 1). CLAHQR works primarily with the Hessenberg submatrix in rows and columns ILO to IHI, but applies transformations to all of H if WANTT is .TRUE.. 1 <= ILO <= max(1,IHI); IHI <= N.
  • H β€” H is COMPLEX array, dimension (LDH,N). On entry, the upper Hessenberg matrix H. On exit, if INFO is zero and if WANTT is .TRUE., then H is upper triangular in rows and columns ILO:IHI. If INFO is zero and if WANTT is .FALSE., then the contents of H are unspecified on exit. The output state of H in case INF is positive is below under the description of INFO.
  • LDH β€” LDH is INTEGER. The leading dimension of the array H. LDH >= max(1,N).
  • W β€” W is COMPLEX array, dimension (N). The computed eigenvalues ILO to IHI are stored in the corresponding elements of W. If WANTT is .TRUE., the eigenvalues are stored in the same order as on the diagonal of the Schur form returned in H, with W(i) = H(i,i).
  • ILOZ β€” ILOZ is INTEGER. (again, no further comment, she said what she said πŸ’€)
  • IHIZ β€” IHIZ is INTEGER. Specify the rows of Z to which transformations must be applied if WANTZ is .TRUE.. 1 <= ILOZ <= ILO; IHI <= IHIZ <= N.
  • Z β€” Z is COMPLEX array, dimension (LDZ,N). If WANTZ is .TRUE., on entry Z must contain the current matrix Z of transformations accumulated by CHSEQR, and on exit Z has been updated; transformations are applied only to the submatrix Z(ILOZ:IHIZ,ILO:IHI). If WANTZ is .FALSE., Z is not referenced.
  • LDZ β€” LDZ is INTEGER. The leading dimension of the array Z. LDZ >= max(1,N).
  • INFO β€” INFO is INTEGER.
    • = 0: successful exit
    • > 0: if INFO = i, CLAHQR failed to compute all the eigenvalues ILO to IHI in a total of 30 iterations per eigenvalue; elements i+1:ihi of W contain those eigenvalues which have been successfully computed.
      • If INFO > 0 and WANTT 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 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)  = (initial value of Z)*U

where U is the orthogonal matrix in (*) (regardless of the value of WANTT.)

real talk: INFO > 0 means it didn't converge β€” 30 iterations per eigenvalue and she said "that's all I got". not a crash, just an honest little "here's what I managed πŸ’€".

⭐ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

🧚 Contributors:

!>
!>     02-96 Based on modifications by
!>     David Day, Sandia National Laboratory, USA
!>
!>     12-04 Further modifications by
!>     Ralph Byers, University of Kansas, USA
!>     This is a modified version of CLAHQR from LAPACK version 3.0.
!>     It is (1) more robust against overflow and underflow and
!>     (2) adopts the more conservative Ahues & Tisseur stopping
!>     criterion (LAWN 122, 1997).
!>

Definition at line 193 of file clahqr.f.


πŸ”₯ subroutine dlahqr (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, integer info)

DLAHQR computes the eigenvalues and Schur factorization of an upper Hessenberg matrix, using the double-shift/single-shift QR algorithm.

πŸ’œ Purpose:

!>
!>    DLAHQR is an auxiliary routine called by DHSEQR to update the
!>    eigenvalues and Schur decomposition already computed by DHSEQR, by
!>    dealing with the Hessenberg submatrix in rows and columns ILO to
!>    IHI.
!>

same gig, different double-precision queen β€” she's the auxiliary DHSEQR leans on to update what's already been computed, handling the Hessenberg submatrix in rows and columns ILO to IHI. πŸ‘‘

πŸ“ Parameters

  • WANTT β€” WANTT is LOGICAL. = .TRUE. : the full Schur form T is required; = .FALSE.: only eigenvalues are required.
  • WANTZ β€” WANTZ is LOGICAL. = .TRUE. : the matrix of Schur vectors Z is required; = .FALSE.: Schur vectors are not required.
  • N β€” N is INTEGER. The order of the matrix H. N >= 0.
  • ILO β€” ILO is INTEGER.
  • IHI β€” IHI is INTEGER. It is assumed that H is already upper quasi-triangular in rows and columns IHI+1:N, and that H(ILO,ILO-1) = 0 (unless ILO = 1). DLAHQR works primarily with the Hessenberg submatrix in rows and columns ILO to IHI, but applies transformations to all of H if WANTT is .TRUE.. 1 <= ILO <= max(1,IHI); IHI <= N.
  • H β€” H is DOUBLE PRECISION array, dimension (LDH,N). On entry, the upper Hessenberg matrix H. On exit, if INFO is zero and if WANTT is .TRUE., H is upper quasi-triangular in rows and columns ILO:IHI, with any 2-by-2 diagonal blocks in standard form. If INFO is zero and WANTT is .FALSE., the contents of H are unspecified on exit. The output state of H if INFO is nonzero is given below under the description of INFO.
  • LDH β€” LDH is INTEGER. The leading dimension of the array H. LDH >= max(1,N).
  • WR β€” WR is DOUBLE PRECISION array, dimension (N). (that's the whole entry, she's a vibe, not a talker ✨)
  • WI β€” WI is DOUBLE PRECISION array, dimension (N). The real and imaginary parts, respectively, of the computed eigenvalues ILO to IHI are stored in the corresponding elements of WR and WI. If two eigenvalues are computed as a complex conjugate pair, they are stored in consecutive elements of WR and WI, say the i-th and (i+1)th, with WI(i) > 0 and WI(i+1) < 0. If WANTT is .TRUE., the eigenvalues are stored in the same order as on the diagonal of the Schur form returned in H, with WR(i) = H(i,i), and, if H(i:i+1,i:i+1) is a 2-by-2 diagonal block, WI(i) = sqrt(H(i+1,i)*H(i,i+1)) and WI(i+1) = -WI(i).
  • ILOZ β€” ILOZ is INTEGER.
  • IHIZ β€” IHIZ is INTEGER. Specify the rows of Z to which transformations must be applied if WANTZ is .TRUE.. 1 <= ILOZ <= ILO; IHI <= IHIZ <= N.
  • Z β€” Z is DOUBLE PRECISION array, dimension (LDZ,N). If WANTZ is .TRUE., on entry Z must contain the current matrix Z of transformations accumulated by DHSEQR, and on exit Z has been updated; transformations are applied only to the submatrix Z(ILOZ:IHIZ,ILO:IHI). If WANTZ is .FALSE., Z is not referenced.
  • LDZ

…and that's exactly where part 1 cuts off, bestie β€” LDZ's little description rolls into part 2, so don't go anywhere 🫢

  • LDZ β€” INTEGER. bestie this is just the leading dimension of the array Z, and it has to be LDZ >= max(1,N). that's it. that's the whole vibe check πŸ’…

INFO

  • INFO β€” it's an INTEGER, and here's the tea β˜•:
    • = 0: successful exit ✨ slay.
    • > 0: if INFO = i, DLAHQR failed to compute all the eigenvalues ILO to IHI in a total of 30 iterations per eigenvalue; elements i+1:ihi of WR and WI contain those eigenvalues which have been successfully computed. so like... partial credit, honestly 😭
okay so the rest of the INFO > 0 situation is a whole saga, let me break it down: if INFO > 0 and WANTT 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 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) = (initial value of Z)*U where U is the orthogonal matrix in (*) (regardless of the value of WANTT.). no cap, that's literally what it says.

πŸ‘‘ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.


πŸ”₯ Further Details:

02-96 Based on modifications by David Day, Sandia National Laboratory, USA 12-04 Further modifications by Ralph Byers, University of Kansas, USA This is a modified version of DLAHQR from LAPACK version 3.0. It is (1) more robust against overflow and underflow and (2) adopts the more conservative Ahues & Tisseur stopping criterion (LAWN 122, 1997).

Definition at line 205 of file dlahqr.f.


🌈 subroutine slahqr

   subroutine slahqr (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, integer info)

SLAHQR computes the eigenvalues and Schur factorization of an upper Hessenberg matrix, using the double-shift/single-shift QR algorithm. πŸ¦‹ yes she does both shifts, she contains multitudes.

πŸŽ€ Purpose:

SLAHQR is an auxiliary routine called by SHSEQR to update the eigenvalues and Schur decomposition already computed by SHSEQR, by dealing with the Hessenberg submatrix in rows and columns ILO to IHI.

so she's the sidekick that does the actual heavy lifting for SHSEQR in that one submatrix, iconic behavior honestly πŸ’…

✨ Parameters

WANTT

  • WANTT β€” LOGICAL bestie:
    • = .TRUE. : the full Schur form T is required;
    • = .FALSE.: only eigenvalues are required.

WANTZ

  • WANTZ β€” also LOGICAL:
    • = .TRUE. : the matrix of Schur vectors Z is required;
    • = .FALSE.: Schur vectors are not required.

N

  • N β€” INTEGER. the order of the matrix H. N >= 0. that's the whole paragraph, she's simple like that πŸŽ€

ILO

  • ILO β€” INTEGER. and that's literally all it says here, no elaboration, we move πŸ™ˆ

IHI

  • IHI β€” INTEGER. okay so the assumption is that H is already upper quasi-triangular in rows and columns IHI+1:N, and that H(ILO,ILO-1) = 0 (unless ILO = 1). SLAHQR works primarily with the Hessenberg submatrix in rows and columns ILO to IHI, but applies transformations to all of H if WANTT is .TRUE.. constraints: 1 <= ILO <= max(1,IHI); IHI <= N. ⭐

H

  • H β€” REAL array, dimension (LDH,N).
    • On entry, the upper Hessenberg matrix H.
    • On exit, if INFO is zero and if WANTT is .TRUE., H is upper quasi-triangular in rows and columns ILO:IHI, with any 2-by-2 diagonal blocks in standard form. If INFO is zero and WANTT is .FALSE., the contents of H are unspecified on exit. The output state of H if INFO is nonzero is given below under the description of INFO. πŸ’€ "unspecified" is giving "we don't know her" energy but fr fr that's what it says.

LDH

  • LDH β€” INTEGER. the leading dimension of the array H. LDH >= max(1,N).

WR

  • WR β€” REAL array, dimension (N). yes bestie that's the entire description, the next one explains it 🫢

WI

  • WI β€” REAL array, dimension (N). so the real and imaginary parts, respectively, of the computed eigenvalues ILO to IHI are stored in the corresponding elements of WR and WI. If two eigenvalues are computed as a complex conjugate pair, they are stored in consecutive elements of WR and WI, say the i-th and (i+1)th, with WI(i) > 0 and WI(i+1) < 0. If WANTT is .TRUE., the eigenvalues are stored in the same order as on the diagonal of the Schur form returned in H, with WR(i) = H(i,i), and, if H(i:i+1,i:i+1) is a 2-by-2 diagonal block, WI(i) = sqrt(H(i+1,i)*H(i,i+1)) and WI(i+1) = -WI(i). πŸ”₯ that's the formula, memorize it, iykyk

ILOZ

  • ILOZ β€” INTEGER. again, that's the whole thing. she's mysterious. πŸ¦‹

IHIZ

  • IHIZ β€” INTEGER. these specify the rows of Z to which transformations must be applied if WANTZ is .TRUE.. constraints: 1 <= ILOZ <= ILO; IHI <= IHIZ <= N. ✨

Z

  • Z β€” REAL array, dimension (LDZ,N).
    • If WANTZ is .TRUE., on entry Z must contain the current matrix Z of transformations accumulated by SHSEQR, and on exit Z has been updated; transformations are applied only to the submatrix Z(ILOZ:IHIZ,ILO:IHI).
    • If WANTZ is .FALSE., Z is not referenced. she simply doesn't exist to us in that case πŸ’…

LDZ

  • LDZ β€” INTEGER. the leading dimension of the array Z. LDZ >= max(1,N).

INFO

  • INFO β€” INTEGER:
    • = 0: successful exit βœ…
    • > 0: if INFO = i, SLAHQR failed to compute all the eigenvalues ILO to IHI in a total of 30 iterations per eigenvalue; elements i+1:ihi of WR and WI contain those eigenvalues which have been successfully computed.
and here's the rest of the INFO > 0 lore, because it's a lot 😭 if INFO > 0 and WANTT 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 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) = (initial value of Z)*U where U is the orthogonal matrix in (*) (regardless of the value of WANTT.). periodt. πŸ‘‘

πŸ‘‘ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.


πŸ”₯ Further Details:

02-96 Based on modifications by David Day, Sandia National Laboratory, USA 12-04 Further modifications by Ralph Byers, University of Kansas, USA This is a modified version of SLAHQR from LAPACK version 3.0. It is (1) more robust against overflow and underflow and (2) adopts the more conservative Ahues & Tisseur stopping criterion (LAWN 122, 1997).

Definition at line 205 of file slahqr.f.


πŸ’œ subroutine zlahqr

   subroutine zlahqr (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, integer info)

ZLAHQR computes the eigenvalues and Schur factorization of an upper Hessenberg matrix, using the double-shift/single-shift QR algorithm. πŸ¦‹ she's the complex*16 sister and she ate.

πŸŽ€ Purpose:

ZLAHQR is an auxiliary routine called by CHSEQR to update the eigenvalues and Schur decomposition already computed by CHSEQR, by dealing with the Hessenberg submatrix in rows and columns ILO to IHI.

same energy as her real sister, but this time it's CHSEQR calling her up. main character energy fr πŸ’…

✨ Parameters

WANTT

  • WANTT β€” LOGICAL:
    • = .TRUE. : the full Schur form T is required;
    • = .FALSE.: only eigenvalues are required.

WANTZ

  • WANTZ β€” LOGICAL:
    • = .TRUE. : the matrix of Schur vectors Z is required;
    • = .FALSE.: Schur vectors are not required.

N

  • N β€” INTEGER. the order of the matrix H. N >= 0. short and sweet πŸŽ€

ILO

  • ILO β€” INTEGER. that's it bestie, that's the description πŸ™ˆ

IHI

  • IHI β€” INTEGER. so it's assumed that H is already upper triangular in rows and columns IHI+1:N, and that H(ILO,ILO-1) = 0 (unless ILO = 1). ZLAHQR works primarily with the Hessenberg submatrix in rows and columns ILO to IHI, but applies transformations to all of H if WANTT is .TRUE.. constraints: 1 <= ILO <= max(1,IHI); IHI <= N. ⭐ (note: upper triangular here, not quasi-triangular like the real version β€” she's complex, no 2-by-2 blocks needed πŸ’…)

H

  • H β€” COMPLEX*16 array, dimension (LDH,N).
    • On entry, the upper Hessenberg matrix H.
    • On exit, if INFO is zero and if WANTT is .TRUE., then H is upper triangular in rows and columns ILO:IHI. If INFO is zero and if WANTT is .FALSE., then the contents of H are unspecified on exit. The output state of H in case INF is positive is below under the description of INFO. πŸ’€ yes it says INF and not INFO in the original, we're not fixing it, we're just noting it, love that for us.

LDH

  • LDH β€” INTEGER. the leading dimension of the array H. LDH >= max(1,N).

W

  • W β€” and that's where we're leaving her, because the page keeps going in the next part 🫢 don't worry, she's coming back.
  • W β€” COMPLEX*16 array, dimension (N) πŸ‘‘ The computed eigenvalues ILO to IHI are stored in the corresponding elements of W. If WANTT is .TRUE., the eigenvalues are stored in the same order as on the diagonal of the Schur form returned in H, with W(i) = H(i,i). πŸ’–
  • ILOZ β€” INTEGER ✨
  • IHIZ β€” INTEGER ✨ Specify the rows of Z to which transformations must be applied if WANTZ is .TRUE.. 1 <= ILOZ <= ILO; IHI <= IHIZ <= N. πŸŽ€
  • Z β€” COMPLEX*16 array, dimension (LDZ,N) πŸ¦‹ If WANTZ is .TRUE., on entry Z must contain the current matrix Z of transformations accumulated by CHSEQR, and on exit Z has been updated; transformations are applied only to the submatrix Z(ILOZ:IHIZ,ILO:IHI). If WANTZ is .FALSE., Z is not referenced. πŸ’…
  • LDZ β€” INTEGER ✨ The leading dimension of the array Z. LDZ >= max(1,N). πŸŽ€
  • INFO β€” INTEGER 🫢
    • = 0: successful exit ✨
    • > 0: if INFO = i, ZLAHQR failed to compute all the eigenvalues ILO to IHI in a total of 30 iterations per eigenvalue; elements i+1:ihi of W contain those eigenvalues which have been successfully computed. 😭
    • If INFO > 0 and WANTT 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 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) = (initial value of Z)*U where U is the orthogonal matrix in (*) (regardless of the value of WANTT.) πŸ’…

πŸ’– Author πŸ’–

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

🫢 Contributors 🫢

  • 02-96 Based on modifications by David Day, Sandia National Laboratory, USA
  • 12-04 Further modifications by Ralph Byers, University of Kansas, USA

This is a modified version of ZLAHQR from LAPACK version 3.0. It is (1) more robust against overflow and underflow and (2) adopts the more conservative Ahues & Tisseur stopping criterion (LAWN 122, 1997). 🌸

Definition at line 193 of file zlahqr.f.

πŸ’– Author πŸ’–

Generated automatically by Doxygen for LAPACK from the source code.

and that's the footer vibe: LAPACK Version 3.12.0, page lahqr(3) β€” mwah, bestie, go compute something iconic πŸ’‹βœ¨

πŸ“¦ where this page comes from