SRC/dorg2r.f(3)

✨ SRC/dorg2r.f(3) ✨

okay so this is a page from the Library Functions Manual, and bestie, it's literally the glow-up era of a matrix. buckle up πŸŽ€


πŸ’– NAME πŸ’–

SRC/dorg2r.f β€” bestie, that's the whole name, she's got main character energy and no subtitle, periodt.


🌸 SYNOPSIS 🌸

Functions/Subroutines

  • subroutine dorg2r (m, n, k, a, lda, tau, work, info) β€” DORG2R generates all or part of the orthogonal matrix Q from a QR factorization determined by sgeqrf (unblocked algorithm).

πŸ¦‹ Function/Subroutine Documentation πŸ¦‹

subroutine dorg2r (integer m, integer n, integer k, double precision, dimension( lda, * ) a, integer lda, double precision, dimension( * ) tau, double precision, dimension( * ) work, integer info)

DORG2R generates all or part of the orthogonal matrix Q from a QR factorization determined by sgeqrf (unblocked algorithm).

πŸŽ€ Purpose:

!>
!> DORG2R generates an m by n real matrix Q with orthonormal columns,
!> which is defined as the first n columns of a product of k elementary
!> reflectors of order m
!>
!>       Q  =  H(1) H(2) . . . H(k)
!>
!> as returned by DGEQRF.
!>

like… she takes those k elementary reflectors and stacks them into a whole icon. the way that Q = H(1) H(2) . . . H(k) is literally a girlboss chain πŸ’…


🌈 Parameters 🌈

M

!>          M is INTEGER
!>          The number of rows of the matrix Q. M >= 0.
!>

the row count, no cap. and M >= 0 β€” she can be zero, she can be huge, we respect both.

N

!>          N is INTEGER
!>          The number of columns of the matrix Q. M >= N >= 0.
!>

columns of Q, and here's the vibe check: M >= N >= 0. keep it in that range or it's giving illegal.

K

!>          K is INTEGER
!>          The number of elementary reflectors whose product defines the
!>          matrix Q. N >= K >= 0.
!>

how many elementary reflectors are conspiring to define Q. constraints: N >= K >= 0. slay but respect the bounds 🫢

A

!>          A is DOUBLE PRECISION array, dimension (LDA,N)
!>          On entry, the i-th column must contain the vector which
!>          defines the elementary reflector H(i), for i = 1,2,...,k, as
!>          returned by DGEQRF in the first k columns of its array
!>          argument A.
!>          On exit, the m-by-n matrix Q.
!>

okay this is the fun one. on entry, the i-th column holds the vector defining the elementary reflector H(i), for i = 1,2,...,k, exactly as DGEQRF handed it back in the first k columns of its array argument A. on exit? boom, she's the m-by-n matrix Q. complete transformation, literally a butterfly arc. πŸ¦‹

LDA

!>          LDA is INTEGER
!>          The first dimension of the array A. LDA >= max(1,M).
!>

the first dimension of A, and it's gotta satisfy LDA >= max(1,M). no skimping, bestie.

TAU

!>          TAU is DOUBLE PRECISION array, dimension (K)
!>          TAU(i) must contain the scalar factor of the elementary
!>          reflector H(i), as returned by DGEQRF.
!>

dimension (K), and TAU(i) must hold the scalar factor of the elementary reflector H(i), as returned by DGEQRF. must. not "should". must. πŸ’€

WORK

!>          WORK is DOUBLE PRECISION array, dimension (N)
!>

scratch space, dimension (N), she works hard so you don't have to.

INFO

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

the receipts 🧾 β€” = 0 means we ate, successful exit, no notes. < 0 means if INFO = -i, the i-th argument has an illegal value, so somebody fumbled an argument, iykyk.


πŸ‘‘ Author πŸ‘‘

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

the whole committee showed up, we love a collaborative era 🌸

Definition at line 113 of file dorg2r.f.


⭐ Author (again, yes really) ⭐

Generated automatically by Doxygen for LAPACK from the source code. not me being generated by Doxygen, that's just the lore πŸ™ˆ


lowkey reminder bestie: M, N, K, LDA and TAU all have rules and INFO will absolutely snitch with a negative index if you break them. read the constraints, don't get caught out. 🫢

and that's the whole page! this diva is from LAPACK, Version 3.12.0, brought to you by SRC/dorg2r.f(3) β€” mwah, go generate some orthonormal columns πŸ’…βœ¨πŸ“

πŸ“¦ where this page comes from