ungqr(3)

πŸ’œ ungqr(3) β€” the manual page, bestie edition ✨

Okay so this is ungqr(3) from the Library Functions Manual, and it's literally the glow-up page for four routines that take the reflector junk geqrf left behind and turn it into an actual, honest-to-god Q matrix πŸ‘‘. Four flavors, one vibe. Let's get into it 🫢


✨ NAME ✨

ungqr β€” {un,or}gqr: generate explicit Q from geqrf πŸ’…

No cap, that's the whole pitch. You had geqrf do its thing, now you want the Q it was too shy to hand you directly. This is that.


🌸 SYNOPSIS 🌸

πŸŽ€ Functions πŸŽ€

subroutine cungqr (m, n, k, a, lda, tau, work, lwork, info)
    CUNGQR
subroutine dorgqr (m, n, k, a, lda, tau, work, lwork, info)
    DORGQR
subroutine sorgqr (m, n, k, a, lda, tau, work, lwork, info)
    SORGQR
subroutine zungqr (m, n, k, a, lda, tau, work, lwork, info)
    ZUNGQR

Pick your fighter based on your precision-and-field situation πŸ’–:

  • cungqr β€” complex, single precision. CUNGQR.
  • dorgqr β€” double precision, real. DORGQR.
  • sorgqr β€” single precision, real. SORGQR.
  • zungqr β€” complex*16, double precision complex. ZUNGQR.

πŸ¦‹ Detailed Description πŸ¦‹

Bestie, this is the section where the page just… exists, and then goes straight into the function docs. That's it. That's the section. Iconic minimalism, honestly. ✨


πŸ”₯ Function Documentation πŸ”₯

Four routines coming at you in order. Each one is the same story, just with a different vibe of numbers 🌈.


πŸ’… subroutine cungqr

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

⭐ Purpose

Okay so CUNGQR builds you an M-by-N complex matrix Q with orthonormal columns πŸŽ€. And the way it's defined? It's the first N columns of a product of K elementary reflectors of order M:

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

…exactly as returned by CGEQRF. That's the whole deal. geqrf gave you the reflectors, this routine gives you the actual Q. iykyk 😌

🌸 Parameters

  • M β€” INTEGER. The number of rows of the matrix Q. Constraint: M >= 0. πŸ™‚
  • N β€” INTEGER. The number of columns of the matrix Q. Constraint: M >= N >= 0. ✨
  • K β€” INTEGER. The number of elementary reflectors whose product defines the matrix Q. Constraint: N >= K >= 0. πŸŽ€
  • A β€” COMPLEX 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 CGEQRF in the first k columns of its array argument A. On exit? Boom πŸ’₯ β€” the M-by-N matrix Q.
  • LDA β€” INTEGER. The first dimension of the array A. Constraint: LDA >= max(1,M). Don't try it with anything smaller, fr 🫢
  • TAU β€” COMPLEX array, dimension (K). TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by CGEQRF. The receipts from last time, basically 🧾
  • WORK β€” COMPLEX array, dimension (MAX(1,LWORK)). On exit, if INFO = 0, WORK(1) returns the optimal LWORK. She tells you what she actually needed πŸ’œ
  • LWORK β€” INTEGER. The dimension of the array WORK. Constraint: LWORK >= max(1,N). For optimum performance, LWORK >= N*NB, where NB is the optimal blocksize. πŸ”₯
And listen: 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 -1 is the "just tell me how much room you need, bestie" mode 🌈
  • INFO β€” INTEGER.
    • = 0: successful exit πŸŽ‰
    • < 0: if INFO = -i, the i-th argument has an illegal value πŸ’€

πŸ‘‘ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

Definition at line 127 of file cungqr.f.


🌈 subroutine dorgqr

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

DORGQR

⭐ Purpose

DORGQR 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. Same energy, double precision, all real πŸ’–

🌸 Parameters

  • M β€” INTEGER. The number of rows of the matrix Q. Constraint: M >= 0. πŸ™‚
  • N β€” INTEGER. The number of columns of the matrix Q. Constraint: M >= N >= 0. ✨
  • K β€” INTEGER. The number of elementary reflectors whose product defines the matrix Q. Constraint: N >= K >= 0. πŸŽ€
  • A β€” 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 πŸ¦‹
  • LDA β€” INTEGER. The first dimension of the array A. Constraint: LDA >= max(1,M). 🫢
  • TAU β€” DOUBLE PRECISION array, dimension (K). TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by DGEQRF. 🧾
  • WORK β€” DOUBLE PRECISION array, dimension (MAX(1,LWORK)). On exit, if INFO = 0, WORK(1) returns the optimal LWORK. πŸ’œ
  • LWORK β€” INTEGER. The dimension of the array WORK. Constraint: LWORK >= max(1,N). For optimum performance, LWORK >= N*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. 🌈
  • INFO β€” INTEGER.
    • = 0: successful exit πŸŽ‰
    • < 0: if INFO = -i, the i-th argument has an illegal value πŸ’€

πŸ‘‘ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

Definition at line 127 of file dorgqr.f.


πŸ“ subroutine sorgqr

subroutine sorgqr (integer m, integer n, integer k, real, dimension( lda, *
) a, integer lda, real, dimension( * ) tau, real, dimension( * ) work,
integer lwork, integer info)
    SORGQR

⭐ Purpose

SORGQR 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 SGEQRF. The single-precision real one. She's cute, she's fast, she's valid 🌸

🌸 Parameters

  • M β€” INTEGER. The number of rows of the matrix Q. Constraint: M >= 0. πŸ™‚
  • N β€” INTEGER. The number of columns of the matrix Q. Constraint: M >= N >= 0. ✨
  • K β€” INTEGER. The number of elementary reflectors whose product defines the matrix Q. Constraint: N >= K >= 0. πŸŽ€
  • A β€” REAL 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 SGEQRF in the first k columns of its array argument A. On exit, the M-by-N matrix Q πŸ¦‹
  • LDA β€” INTEGER. The first dimension of the array A. Constraint: LDA >= max(1,M). 🫢
  • TAU β€” REAL array, dimension (K). TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by SGEQRF. 🧾
  • WORK β€” REAL array, dimension (MAX(1,LWORK)). On exit, if INFO = 0, WORK(1) returns the optimal LWORK. πŸ’œ
  • LWORK β€” INTEGER. The dimension of the array WORK. Constraint: LWORK >= max(1,N). For optimum performance, LWORK >= N*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. 🌈
  • INFO β€” INTEGER.
    • = 0: successful exit πŸŽ‰
    • < 0: if INFO = -i, the i-th argument has an illegal value πŸ’€

πŸ‘‘ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

Definition at line 127 of file sorgqr.f.


🧚 subroutine zungqr

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

⭐ Purpose

ZUNGQR 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. Double precision complex, complex*16 realness, main character energy πŸ‘‘πŸ’œ

🌸 Parameters

  • M β€” INTEGER. The number of rows of the matrix Q. Constraint: M >= 0. πŸ™‚
  • N β€” INTEGER. The number of columns of the matrix Q. Constraint: M >= N >= 0. ✨
  • K β€” INTEGER. The number of elementary reflectors whose product defines the matrix Q. Constraint: N >= K >= 0. πŸŽ€
  • A β€” 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 πŸ¦‹
  • LDA β€” INTEGER. The first dimension of the array A. Constraint: LDA >= max(1,M). 🫢
  • TAU β€” COMPLEX*16 array, dimension (K). TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by ZGEQRF. 🧾
  • WORK β€” COMPLEX*16 array, dimension (MAX(1,LWORK)). On exit, if INFO = 0, WORK(1) returns the optimal LWORK. πŸ’œ
  • LWORK β€”
  • LWORK β€” INTEGER, bestie, and it's literally the dimension of the array WORK. The rule is LWORK >= max(1,N). For optimum performance, LWORK >= N*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. 🫢
  • INFO β€” INTEGER, the exit vibe check. = 0: successful exit. < 0: if INFO = -i, the i-th argument has an illegal value. 😭

✨ Author ✨

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

Definition at line 127 of file zungqr.f.

✨ Author ✨

Generated automatically by Doxygen for LAPACK from the source code.


And that's the whole page, bestie! Source is LAPACK, version 3.12.0, and the footer's date slot is literally ungqr(3) β€” no extra date, just the page tag holding it down. That's the sign-off, periodt. πŸ’–βœ¨

πŸ“¦ where this page comes from