DGEHD2(3)
π 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 matrixA, and you needN >= 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 thatAis already upper triangular in rows and columns1:ILO-1andIHI+1:N. where doILOandIHIcome from? normally a previous call toDGEBALsets them β otherwise you set them to1andNrespectively. peep the Further Details section for more π and the rules are1 <= ILO <= IHI <= max(1,N). no cap. βAβA is DOUBLE PRECISION array, dimension (LDA,N). on entry: thenbyngeneral matrix to be reduced, your before pic. on exit: the upper triangle and the first subdiagonal ofAare overwritten with the upper Hessenberg matrixH, and the elements below the first subdiagonal β plus the arrayTAUβ represent the orthogonal matrixQas 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 arrayA, andLDA >= 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: ifINFO = -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
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms