SRC/cunglq.f(3)

πŸ’… NAME

SRC/cunglq.f β€” bestie, this is LAPACK's CUNGLQ, the glow-up routine ✨


πŸ¦‹ SYNOPSIS

Functions/Subroutines

subroutine cunglq (m, n, k, a, lda, tau, work, lwork, info)

CUNGLQ β€” that's the whole vibe, iykyk πŸ’«


🌸 Function/Subroutine Documentation

πŸŽ€ subroutine cunglq

subroutine cunglq (integer m, integer n, integer k, complex, dimension( lda, * ) a,
                   integer lda, complex, dimension( * ) tau,
                   complex, dimension( * ) work, integer lwork, integer info)

CUNGLQ πŸ‘‘


✨ Purpose:

Lowkey the whole point of this queen:

!>
!> CUNGLQ 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 CGELQF.
!>

So, like, she builds you Q β€” an M-by-N complex matrix with orthonormal rows, no cap β€” and it's the first M rows of that big reflector product up there, straight from CGELQF. It's giving factory-fresh ✨🫢


πŸ’– Parameters

⭐ M

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

Number of rows in Q. Must be M >= 0.

🌈 N

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

Number of columns in Q. Needs N >= M β€” she needs room to breathe πŸ’…

πŸ¦‹ K

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

How many elementary reflectors you're stacking into the product that defines Q. Range: M >= K >= 0.

🌸 A

!>          A is COMPLEX 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 CGELQF in the first k rows of its array argument A.
!>          On exit, the M-by-N matrix Q.
!>

Main character array, dimension (LDA,N) πŸ’– On entry, the i-th row holds the vector defining the elementary reflector H(i) for i = 1,2,...,k, exactly as CGELQF handed it over in the first k rows of its argument A. On exit? Boom, she's the M-by-N matrix Q. Glow-up arc, periodt ✨

πŸŽ€ LDA

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

The first dimension of A. Gotta be LDA >= max(1,M) β€” no skipping, that's the rule πŸ“

πŸ’« TAU

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

Complex array, dimension (K). TAU(i) holds the scalar factor of the elementary reflector H(i), as returned by CGELQF. She's the little sparkle that makes each reflector go 🧚

πŸ”₯ WORK

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

Complex workspace, dimension (MAX(1,LWORK)). On exit, if INFO = 0, then WORK(1) hands you back the optimal LWORK β€” the receipt for your workspace, basically 🧾

πŸ‘‘ LWORK

!>          LWORK is INTEGER
!>          The dimension of the array WORK. LWORK >= max(1,M).
!>          For optimum performance LWORK >= M*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.
!>

Size of the WORK array. Minimum is LWORK >= max(1,M), but for optimum performance you want LWORK >= M*NB, where NB is the optimal blocksize. Slay, give her room 😌

🚨 Special case, bestie: if LWORK = -1, a workspace query is assumed. She 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. It's a look-don't-touch moment πŸ™ˆ

πŸ“ INFO

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

The verdict πŸ’€

  • = 0: successful exit, we ate πŸ”₯
  • < 0: if INFO = -i, the i-th argument has an illegal value β€” not her fault, it's giving user error 😭

πŸ’œ Author

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

Definition at line 126 of file cunglq.f. πŸ“


🌟 Author

Generated automatically by Doxygen for LAPACK from the source code. (Robots made this one, iconic πŸ€–βœ¨)


πŸ’Œ Cute lil sign-off: this whole page is LAPACK, Version 3.12.0, for SRC/cunglq.f(3) β€” go forth and orthonormalize your rows, bestie πŸ«ΆπŸ’…πŸŽ€
πŸ“¦ where this page comes from