DGEHD2(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

πŸŽ€ NAME πŸŽ€

ok so this whole page is literally about one file, bestie, and its name is the full path:

/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/dgehd2.f

that's it, that's the name. iconic of fortran tbh πŸ’…


✨ SYNOPSIS ✨

Functions/Subroutines

here's the whole vibe in one line:

subroutine DGEHD2 (n, ilo, ihi, a, lda, tau, work, info)

and what does it DO, you ask? DGEHD2 reduces a general square matrix to upper Hessenberg form using an unblocked algorithm. slay πŸ¦‹


πŸ‘‘ Function/Subroutine Documentation πŸ‘‘

ok so here's the full signature, no cuts, no edits:

subroutine DGEHD2 (integer n, integer ilo, integer ihi, double precision,
    dimension( lda, * ) a, integer lda, double precision, dimension( * )
    tau, double precision, dimension( * ) work, integer info)

and again for the people in the back: DGEHD2 reduces a general square matrix to upper Hessenberg form using an unblocked algorithm. periodt πŸ’œ

🌸 Purpose 🌸

!>
!> DGEHD2 reduces a real general matrix A to upper Hessenberg form H by
!> an orthogonal similarity transformation:  Q**T * A * Q = H .
!>

like, it takes your messy general matrix and gives you the glow-up: Q**T * A * Q = H. main character transformation fr 🧚✨

πŸ’– Parameters πŸ’–

  • N β€” N is INTEGER. it's the order of the matrix A, and you need N >= 0. simple as that πŸ“
  • ILO β€” ILO is INTEGER. that's the whole description, no notes, we love a low-maintenance parameter πŸ™ˆ
  • IHI β€” IHI is INTEGER. so the assumption here is that A is already upper triangular in rows and columns 1:ILO-1 and IHI+1:N. where do ILO and IHI come from? normally a previous call to DGEBAL sets them β€” otherwise you set them to 1 and N respectively. peep the Further Details section for more πŸ‘€ and the rules are 1 <= ILO <= IHI <= max(1,N). no cap. ⭐
  • A β€” A is DOUBLE PRECISION array, dimension (LDA,N). on entry: the n by n general matrix to be reduced, your before pic. on exit: the upper triangle and the first subdiagonal of A are overwritten with the upper Hessenberg matrix H, and the elements below the first subdiagonal β€” plus the array TAU β€” represent the orthogonal matrix Q as a product of elementary reflectors. see Further Details, bestie, they did not leave you hanging πŸ’…
  • LDA β€” LDA is INTEGER. it's the leading dimension of the array A, and LDA >= max(1,N). respect the constraint 🫢
  • TAU β€” TAU is DOUBLE PRECISION array, dimension (N-1). these are the scalar factors of the elementary reflectors (again: Further Details). they're doing the heavy lifting ngl πŸ”₯
  • WORK β€” WORK is DOUBLE PRECISION array, dimension (N). scratch space, we love her 🌈
  • INFO β€” INFO is INTEGER. the vibe check at the end:
    • = 0: successful exit. ate and left no crumbs πŸ‘‘
    • < 0: if INFO = -i, the i-th argument had an illegal value. something you passed in was not it 😭

πŸ¦‹ Author πŸ¦‹

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

all of them, together, for this one subroutine πŸ’€

🌟 Further Details: 🌟

!>
!>  The matrix Q is represented as a product of (ihi-ilo) elementary
!>  reflectors
!>
!>     Q = H(ilo) H(ilo+1) . . . H(ihi-1).
!>
!>  Each H(i) has the form
!>
!>     H(i) = I - tau * v * v**T
!>
!>  where tau is a real scalar, and v is a real vector with
!>  v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0; v(i+2:ihi) is stored on
!>  exit in A(i+2:ihi,i), and tau in TAU(i).
!>

ok so to translate: Q is a product of (ihi-ilo) elementary reflectors, and each H(i) is I - tau * v * v**T, where tau is a real scalar and v is a real vector with v(1:i) = 0, v(i+1) = 1 and v(ihi+1:n) = 0. and on exit, v(i+2:ihi) lives in A(i+2:ihi,i) and tau lives in TAU(i). the whole thing is giving organized chaos, and honestly? obsessed πŸ’œ

and here's the diagram they bless us with, with n = 7, ilo = 2 and ihi = 6:

!>
!>  on entry,                        on exit,
!>
!>  ( a   a   a   a   a   a   a )    (  a   a   h   h   h   h   a )
!>  (     a   a   a   a   a   a )    (      a   h   h   h   h   a )
!>  (     a   a   a   a   a   a )    (      h   h   h   h   h   h )
!>  (     a   a   a   a   a   a )    (      v2  h   h   h   h   h )
!>  (     a   a   a   a   a   a )    (      v2  v3  h   h   h   h )
!>  (     a   a   a   a   a   a )    (      v2  v3  v4  h   h   h )
!>  (                         a )    (                          a )
!>

legend for the diagram, so you're not squinting: a = an element of the original matrix A, h = a modified element of the upper Hessenberg matrix H, and vi = an element of the vector defining H(i). before and after, right there. it's giving makeover montage πŸ’…βœ¨

also, for the record: Definition at line 148 of file dgehd2.f. don't @ me, that's just where it lives 🫢

🌈 Author 🌈

Generated automatically by Doxygen for LAPACK from the source code. a bot wrote this page and honestly it did great, no notes πŸŽ€


k bye bestie, this page is from LAPACK Version 3.12.0, and yes the file is /home/abui...RC/dgehd2.f(3) β€” go reduce some matrices, ily πŸ’–πŸ¦‹β­

πŸ“¦ where this page comes from