SRC/zung2r.f(3)

πŸ’œ SRC/zung2r.f β€” ok bestie, let me put you ON πŸ’œ

so this page lives in the Library Functions Manual section, and it's literally the docs for SRC/zung2r.f. it's a Fortran file in LAPACK and it's about to generate a whole matrix of orthonormal columns for you. no cap. ✨


🌸 NAME 🌸

SRC/zung2r.f β€” the file, the legend, the vibe. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

Functions/Subroutines

  • subroutine zung2r (m, n, k, a, lda, tau, work, info) β€” ZUNG2R, that's her, that's the whole icon πŸ‘‘

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

⭐ subroutine zung2r (integer m, integer n, integer k, complex*16, dimension( lda, * ) a, integer lda, complex*16, dimension( * ) tau, complex*16, dimension( * ) work, integer info)

ZUNG2R. say it with your chest. πŸ’–

✨ Purpose ✨

ok so here's the tea, straight from the source:

!>
!> ZUNG2R generates an m by n complex 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 ZGEQRF.
!>

like, she literally builds Q for you out of the first n columns of that product of k elementary reflectors of order m. and where does she get them? from ZGEQRF, obviously. iykyk 🧚


🌈 Parameters 🌈

buckle up, we're going through every single one, because that's what besties do 🫢

M

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

it's the row count of Q, and it's INTEGER, and M >= 0. that's it, that's the rule. πŸ’€

N

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

column count of Q. and note the constraint, bestie: M >= N >= 0. don't get cute with it. πŸ™ˆ

K

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

how many elementary reflectors we're multiplying together to define Q. and the rule is N >= K >= 0. periodt. πŸ’…

A

!>          A is COMPLEX*16 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 ZGEQRF in the first k columns of its array
!>          argument A.
!>          On exit, the m by n matrix Q.
!>

ok this one is the main character, genuinely. it's a COMPLEX*16 array, dimension (LDA,N).

on entry: the i-th column holds the vector defining H(i), for i = 1,2,...,k, exactly as ZGEQRF gave it back in the first k columns of its array argument A.

on exit: it's the m by n matrix Q. glow-up of the century honestly πŸ”₯

LDA

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

INTEGER, first dimension of A, and LDA >= max(1,M). love a boundary check ✨

TAU

!>          TAU is COMPLEX*16 array, dimension (K)
!>          TAU(i) must contain the scalar factor of the elementary
!>          reflector H(i), as returned by ZGEQRF.
!>

COMPLEX*16, dimension (K). TAU(i) has to hold the scalar factor of H(i), again, as returned by ZGEQRF. she's consistent, we stan 🌸

WORK

!>          WORK is COMPLEX*16 array, dimension (N)
!>

COMPLEX*16, dimension (N). that's the whole description. no notes. πŸ’œ

INFO

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

the vibe check at the end:

  • = 0 β€” successful exit, we ate πŸŽ‰
  • < 0 β€” if INFO = -i, then the i-th argument has an illegal value. rude but fair 😭

πŸ‘‘ Author πŸ‘‘

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

look at that resume. iconic. 🌟


πŸ’« Definition at line 113 of file zung2r.f.

yes, literally line 113. go look, she's right there.


πŸ“ Author πŸ“

Generated automatically by Doxygen for LAPACK from the source code. the robots did this one, not me 🫢


ok that's the whole page, every flag and constraint intact, nothing skipped, no invented lore. you're welcome bestie πŸ’…

so that was SRC/zung2r.f(3), and this iconic little manual page is from LAPACK, Version 3.12.0 β€” mwah, go build your orthonormal columns, you got this πŸŒˆπŸ’–πŸŽ€

πŸ“¦ where this page comes from