SRC/dorghr.f(3)

✨ SRC/dorghr.f ✨

okay bestie, gather round, because we're about to talk about SRC/dorghr.f and honestly? it's kind of iconic. this is the LAPACK routine dorghr and it's giving major main character energy in the Householder reflector universe πŸ’…


✨ SYNOPSIS ✨

πŸŽ€ Functions/Subroutines

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

DORGHR β€” say it with me, bestie πŸ—£οΈ


πŸ’– Function/Subroutine Documentation πŸ’–

🌸 subroutine dorghr

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

DORGHR

πŸ¦‹ Purpose:

!> DORGHR generates a real orthogonal matrix Q which is defined as the !> product of IHI-ILO elementary reflectors of order N, as returned by !> DGEHRD: !> !> Q = H(ilo) H(ilo+1) . . . H(ihi-1). !>

lowkey the way it just builds Q out of those reflectors? obsessed 😭✨


🌈 Parameters

  • N
!> N is INTEGER !> The order of the matrix Q. N >= 0. !>

fr fr, it's the order of Q, and it's gotta be N >= 0 no cap 🫢

  • ILO
!> ILO is INTEGER !>

that's it, that's the whole note for ILO bestie, it's just an INTEGER πŸ’€ (the real tea is in IHI, keep reading)

  • IHI
!> IHI is INTEGER !> !> ILO and IHI must have the same values as in the previous call !> of DGEHRD. Q is equal to the unit matrix except in the !> submatrix Q(ilo+1:ihi,ilo+1:ihi). !> 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0. !>

okay so ILO and IHI must match what you passed to DGEHRD last time β€” like, they have to be the same values, periodt. Q is literally the unit matrix everywhere except in the submatrix Q(ilo+1:ihi,ilo+1:ihi). and the constraints? 1 <= ILO <= IHI <= N, if N > 0; but if N=0, then ILO=1 and IHI=0. don't come for me, that's just the rules πŸŽ€

  • A
!> A is DOUBLE PRECISION array, dimension (LDA,N) !> On entry, the vectors which define the elementary reflectors, !> as returned by DGEHRD. !> On exit, the N-by-N orthogonal matrix Q. !>

on entry it's holding the vectors that define the elementary reflectors (as returned by DGEHRD), and on exit? boom, it's the N-by-N orthogonal matrix Q. glow-up moment ✨πŸ”₯

  • LDA
!> LDA is INTEGER !> The leading dimension of the array A. LDA >= max(1,N). !>

leading dimension of A, and it's gotta be LDA >= max(1,N). simple as πŸ’…

  • TAU
!> TAU is DOUBLE PRECISION array, dimension (N-1) !> TAU(i) must contain the scalar factor of the elementary !> reflector H(i), as returned by DGEHRD. !>

TAU(i) has to contain the scalar factor of the elementary reflector H(i), as returned by DGEHRD. dimension is (N-1) β€” not N, bestie, N-1 πŸ™ˆ

  • WORK
!> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)) !> On exit, if INFO = 0, WORK(1) returns the optimal LWORK. !>

workspace array, dimension (MAX(1,LWORK)). on exit, if INFO = 0, then WORK(1) returns the optimal LWORK. iykyk 🌸

  • LWORK
!> LWORK is INTEGER !> The dimension of the array WORK. LWORK >= IHI-ILO. !> For optimum performance LWORK >= (IHI-ILO)*NB, where NB is !> the optimal blocksize. !> !> If LWORK = -1, then a workspace query is assumed; the routine !> only calculates the optimal size of the WORK array, returns !> this value as the first entry of the WORK array, and no error !> message related to LWORK is issued by XERBLA. !>

dimension of the WORK array. minimum is LWORK >= IHI-ILO, but for optimum performance you want LWORK >= (IHI-ILO)*NB, where NB is the optimal blocksize. and bestie, listen β€” if LWORK = -1, it's a workspace query: the routine only calculates the optimal size of the WORK array, returns that value as the first entry of WORK, and no error message related to LWORK is issued by XERBLA. so don't panic, it's intentional πŸ’€βœ¨

  • INFO
!> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value !>

= 0 means successful exit, slay πŸŽ‰. < 0 means if INFO = -i, the i-th argument had an illegal value β€” so check your args, bestie 🫢


πŸ‘‘ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.


⭐ Definition at line 125 of file dorghr.f.


🌟 Author (yes, again) 🌟

Generated automatically by Doxygen for LAPACK from the source code.


and that's the whole vibe, bestie πŸ’– this page is from LAPACK Version 3.12.0, dated like the footer says β€” go forth and generate those orthogonal matrices, you absolute icon πŸ‘‘βœ¨πŸ¦‹

πŸ“¦ where this page comes from