SRC/zunmrz.f(3)

πŸ’… SRC/zunmrz.f β€” like, the ZUNMRZ page, but make it make sense

okay so bestie, this is SRC/zunmrz.f from the LAPACK Library Functions Manual, and no cap, it's a whole vibe once you get past the Fortran. Sit down, grab a strawberry πŸ“, and let's get into it.


✨ SYNOPSIS ✨

Functions/Subroutines

  • subroutine zunmrz (side, trans, m, n, k, l, a, lda, tau, c, ldc, work, lwork, info) β€” like, the whole entire thing. that's her. that's ZUNMRZ.

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

subroutine zunmrz (character side, character trans, integer m, integer n, integer k, integer l, complex*16, dimension( lda, * ) a, integer lda, complex*16, dimension( * ) tau, complex*16, dimension( ldc, * ) c, integer ldc, complex*16, dimension( * ) work, integer lwork, integer info)

ZUNMRZ β€” the main character, honestly. πŸ‘‘

🌸 Purpose:

okay so picture this, bestie. ZUNMRZ overwrites the general complex M-by-N matrix C with, and I'm gonna show you the table because the table ate:

                SIDE = 'L'     SIDE = 'R'
TRANS = 'N':      Q * C          C * Q
TRANS = 'C':      Q**H * C       C * Q**H

where Q is a complex unitary matrix defined as the product of k elementary reflectors β€” like a little squad of them, fr fr:

      Q = H(1) H(2) . . . H(k)

as returned by ZTZRZF. and here's the part you gotta remember: Q is of order M if SIDE = 'L', and of order N if SIDE = 'R'. iykyk πŸ’«


πŸŽ€ Parameters πŸŽ€

  • SIDE β€” this one is CHARACTER*1, and it's literally just "which side are we applying from":
    • = 'L': apply Q or Q**H from the Left;
    • = 'R': apply Q or Q**H from the Right.
  • TRANS β€” also CHARACTER*1, and it's giving "are we transposing or not":
    • = 'N': No transpose, apply Q;
    • = 'C': Conjugate transpose, apply Q**H.
  • M β€” INTEGER. The number of rows of the matrix C. Constraint: M >= 0. (yes she can be zero, no she will not be dramatic about it)
  • N β€” INTEGER. The number of columns of the matrix C. Constraint: N >= 0.
  • K β€” INTEGER. The number of elementary reflectors whose product defines the matrix Q. And the vibes are:
    • If SIDE = 'L', M >= K >= 0;
    • if SIDE = 'R', N >= K >= 0.
  • L β€” INTEGER. The number of columns of the matrix A containing the meaningful part of the Householder reflectors. So: if SIDE = 'L', M >= L >= 0; if SIDE = 'R', N >= L >= 0.
  • A β€” COMPLEX*16 array, dimension
                             (LDA,M) if SIDE = 'L',
                             (LDA,N) if SIDE = 'R'

The i-th row must contain the vector which defines the elementary reflector H(i), for i = 1,2,...,k, as returned by ZTZRZF in the last k rows of its array argument A. important: A is modified by the routine but restored on exit. so she plays with it and then puts it back, we love a considerate icon 🫢

  • LDA β€” INTEGER. The leading dimension of the array A. LDA >= max(1,K).
  • TAU β€” COMPLEX*16 array, dimension (K). TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by ZTZRZF.
  • C β€” COMPLEX*16 array, dimension (LDC,N). On entry, the M-by-N matrix C. On exit, C is overwritten by Q*C or Q**H*C or C*Q**H or C*Q. she's not coming back the same, periodt.
  • LDC β€” INTEGER. The leading dimension of the array C. LDC >= max(1,M).
  • WORK β€” COMPLEX*16 array, dimension (MAX(1,LWORK)). On exit, if INFO = 0, WORK(1) returns the optimal LWORK. (she tells you the optimal size as a little treat ✨)
  • LWORK β€” INTEGER. The dimension of the array WORK.
    • If SIDE = 'L', LWORK >= max(1,N);
    • if SIDE = 'R', LWORK >= max(1,M).
    • For good performance, LWORK should generally be larger. (bigger is better, no notes πŸ’…)
🚨 okay this bit matters: 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. so don't come for her about LWORK when you literally asked for a query, bestie.
  • INFO β€” INTEGER:
    • = 0: successful exit πŸŽ‰
    • < 0: if INFO = -i, the i-th argument had an illegal value 😭

πŸ‘‘ Author

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

🌈 Contributors:

  • A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA

⭐ Further Details:

literally nothing else here. the section exists, the section is empty, and honestly? she's an icon for that. (the original has an empty !> block, so we're honoring it exactly β€” no invented lore, ngl)

πŸ”₯ Definition at line 185 of file zunmrz.f.


πŸ’œ Author (the other one)

Generated automatically by Doxygen for LAPACK from the source code. (yes, a robot wrote the paperwork. she still ate.)


k bye bestie, go apply that unitary matrix πŸ’–

LAPACK β€” Version 3.12.0 β€” SRC/zunmrz.f(3) πŸŒΈπŸ¦‹βœ¨

πŸ“¦ where this page comes from