SRC/zungl2.f(3)

πŸ’… SRC/zungl2.f(3) β€” the library functions manual, but make it make sense

okay so bestie, this is the page for SRC/zungl2.f from the LAPACK manual (Library Functions Manual section 3), and it's literally just about one lil subroutine. let's get into it πŸŽ€


✨ NAME ✨

SRC/zungl2.f β€” that's the file, that's the vibe, that's the whole name section, no cap πŸ’–


🌸 SYNOPSIS 🌸

Functions/Subroutines

subroutine zungl2 (m, n, k, a, lda, tau, work, info)
ZUNGL2 generates all or part of the unitary matrix Q from an LQ factorization determined by cgelqf (unblocked algorithm).

that's the one-line summary and it ate, honestly πŸ‘‘


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

⭐ subroutine zungl2

here's the full signature, exactly as it is, no edits, we don't do that here:

subroutine zungl2 (integer m, integer n, integer k, complex*16, dimension( lda, * ) a, integer lda, complex*16, dimension( * ) tau, complex*16, dimension( * ) work, integer info)
ZUNGL2 generates all or part of the unitary matrix Q from an LQ factorization determined by cgelqf (unblocked algorithm).

πŸ’œ Purpose

okay so the whole point, fr fr:

!>
!> ZUNGL2 generates an m-by-n complex matrix Q with orthonormal rows,
!> which is defined as the first m rows of a product of k elementary
!> reflectors of order n
!>
!>       Q  =  H(k)**H . . . H(2)**H H(1)**H
!>
!> as returned by ZGELQF.
!>

so like, Q has orthonormal rows, it's the first m rows of that big product of k elementary reflectors of order n, and you get all of that back from ZGELQF. main character matrix energy, honestly πŸ’…βœ¨


πŸ”₯ Parameters

  • M β€” M is INTEGER. The number of rows of the matrix Q. M >= 0. (yes bestie, zero is allowed, we love an empty queen πŸ™ˆ)
  • N β€” N is INTEGER. The number of columns of the matrix Q. N >= M. (columns gotta be at least as many as rows, no negotiating 🫢)
  • K β€” K is INTEGER. The number of elementary reflectors whose product defines the matrix Q. M >= K >= 0. the middle child of the constraints, and it's sandwiched 😭
  • A β€” A is COMPLEX*16 array, dimension (LDA,N). On entry, the i-th row must contain the vector which defines the elementary reflector H(i), for i = 1,2,...,k, as returned by ZGELQF in the first k rows of its array argument A. On exit, the m by n matrix Q. β€” so it goes in as reflector data and comes out as a whole entire Q, glow-up of the century 🌈
  • LDA β€” LDA is INTEGER. The first dimension of the array A. LDA >= max(1,M). don't skip the max(1,...), that 1 is doing important work πŸ’€
  • TAU β€” TAU is COMPLEX*16 array, dimension (K). TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by ZGELQF. she's small but she matters πŸ“
  • WORK β€” WORK is COMPLEX*16 array, dimension (M). that's it, that's the whole description, scratch space, iconic minimalism ✨
  • INFO β€” INFO is INTEGER.
    • = 0: successful exit πŸŽ‰
    • < 0: if INFO = -i, the i-th argument has an illegal value πŸ’€
ngl the INFO rules are the whole mood: exit clean or tell me exactly which argument you're mad about. periodt.

πŸ‘‘ Author πŸ‘‘

the legends who brought you this:

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

four institutions, one subroutine, absolute squad goals 🫢

Definition at line 112 of file zungl2.f. β€” yes, line 112, go look, iykyk πŸ“–


🌟 Author (again, but the meta one) 🌟

Generated automatically by Doxygen for LAPACK from the source code. so nobody hand-wrote this page, a robot did it, and honestly the robot ate πŸ€–πŸ’–


aaaand that's the whole page bestie, every flag, every constraint, every line reference, all of it, untouched πŸ”₯

lowkey a reminder: the M >= 0, N >= M, M >= K >= 0, and LDA >= max(1,M) checks are not suggestions β€” feed this thing a bad argument and INFO will call you out with a negative index 😭

sign-off time πŸŽ€ this was SRC/zungl2.f(3) from the LAPACK manual, Version 3.12.0 β€” stay orthonormal, bestie, and may all your rows be unit-length πŸ’œπŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from