ungql(3)

πŸ’… ungql(3) β€” {un,or}gql: generate explicit Q from geqlf

okay bestie, welcome to the Library Functions Manual page for ungql(3) β€” yes the whole page is named after the family and honestly it's giving "one group chat, four besties, same personality" πŸ’–

so like, quick vibe check before we dive in: geqlf already handed you a bunch of elementary reflectors, right? and now you want the actual Q matrix out of them. that's literally this page. four routines, one job: build the explicit M-by-N matrix Q with orthonormal columns from the last N columns of a product of K elementary reflectors of order M. iconic behaviour, no notes ✨


🌸 NAME 🌸

ungql β€” {un,or}gql: generate explicit Q from geqlf


πŸ¦‹ SYNOPSIS πŸ¦‹

Functions

  • subroutine cungql (m, n, k, a, lda, tau, work, lwork, info) β€” CUNGQL πŸ’œ
  • subroutine dorgql (m, n, k, a, lda, tau, work, lwork, info) β€” DORGQL πŸ’œ
  • subroutine sorgql (m, n, k, a, lda, tau, work, lwork, info) β€” SORGQL πŸ’œ
  • subroutine zungql (m, n, k, a, lda, tau, work, lwork, info) β€” ZUNGQL πŸ’œ

same argument list, four different data types. pick your fighter 🫢


πŸŽ€ DETAILED DESCRIPTION πŸŽ€

the detailed description section is lowkey just hanging out here being a heading β€” the actual tea is all in the Function Documentation below, where each of the four routines gets its own full glow-up with purpose, parameters, author credits and where it lives in the source. keep scrolling bestie, it's all there πŸ’€βœ¨


πŸ‘‘ FUNCTION DOCUMENTATION πŸ‘‘

πŸ’– cungql β€” CUNGQL

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

Purpose 🌟

CUNGQL generates an M-by-N complex matrix Q with orthonormal columns, and it's defined as the last N columns of a product of K elementary reflectors of order M, like this:

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

exactly as returned by CGEQLF. no cap, that's the whole assignment 🧚

Parameters πŸ’…

  • M β€” INTEGER. the number of rows of the matrix Q. M >= 0.
  • N β€” INTEGER. the number of columns of the matrix Q. M >= N >= 0.
  • K β€” INTEGER. the number of elementary reflectors whose product defines the matrix Q. N >= K >= 0.
  • A β€” COMPLEX array, dimension (LDA,N). on entry, the (n-k+i)-th column must contain the vector which defines the elementary reflector H(i), for i = 1,2,...,k, as returned by CGEQLF in the last k columns of its array argument A. on exit? it's the M-by-N matrix Q. glow-up complete ✨
  • LDA β€” INTEGER. the first dimension of the array A. LDA >= max(1,M).
  • TAU β€” COMPLEX array, dimension (K). TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by CGEQLF.
  • WORK β€” COMPLEX array, dimension (MAX(1,LWORK)). on exit, if INFO = 0, WORK(1) returns the optimal LWORK.
  • LWORK β€” INTEGER. the dimension of the array WORK. 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. cute little dry-run moment πŸ”
  • INFO β€” INTEGER. = 0: successful exit. < 0: if INFO = -i, the i-th argument has an illegal value. πŸ’€
bestie do NOT ignore a negative INFO β€” that's the routine telling you which argument came in illegal, count them in order and fix it.

Author 🫢

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

Definition at line 127 of file cungql.f.


πŸ’œ dorgql β€” DORGQL

subroutine dorgql (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)

DORGQL

Purpose 🌟

DORGQL generates an M-by-N real matrix Q with orthonormal columns, defined as the last N columns of a product of K elementary reflectors of order M:

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

as returned by DGEQLF. same energy, double the precision πŸŽ€

Parameters πŸ’…

  • M β€” INTEGER. the number of rows of the matrix Q. M >= 0.
  • N β€” INTEGER. the number of columns of the matrix Q. M >= N >= 0.
  • K β€” INTEGER. the number of elementary reflectors whose product defines the matrix Q. N >= K >= 0.
  • A β€” DOUBLE PRECISION array, dimension (LDA,N). on entry, the (n-k+i)-th column must contain the vector which defines the elementary reflector H(i), for i = 1,2,...,k, as returned by DGEQLF in the last k columns of its array argument A. on exit, the M-by-N matrix Q 🌈
  • LDA β€” INTEGER. the first dimension of the array A. 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 DGEQLF.
  • 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. 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 dorgql.f.


πŸ“ sorgql β€” SORGQL

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

SORGQL

Purpose 🌟

SORGQL generates an M-by-N real matrix Q with orthonormal columns, which is defined as the last N columns of a product of K elementary reflectors of order M:

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

as returned by SGEQLF. single precision bestie, still serving πŸ§šβ€β™€οΈ

Parameters πŸ’…

  • M β€” INTEGER. the number of rows of the matrix Q. M >= 0.
  • N β€” INTEGER. the number of columns of the matrix Q. M >= N >= 0.
  • K β€” INTEGER. the number of elementary reflectors whose product defines the matrix Q. N >= K >= 0.
  • A β€” REAL array, dimension (LDA,N). on entry, the (n-k+i)-th column must contain the vector which defines the elementary reflector H(i), for i = 1,2,...,k, as returned by SGEQLF in the last k columns of its array argument A. on exit, the M-by-N matrix Q 🌸
  • LDA β€” INTEGER. the first dimension of the array A. 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 SGEQLF.
  • 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. 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 sorgql.f.


πŸ¦‹ zungql β€” ZUNGQL

subroutine zungql (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)

ZUNGQL

Purpose 🌟

ZUNGQL generates an M-by-N complex matrix Q with orthonormal columns, and it's defined as the last N columns of a product of K elementary reflectors of order M:

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

as returned by ZGEQLF. double complex, double drama, double slay πŸ’œ

Parameters πŸ’…

  • M β€” INTEGER. the number of rows of the matrix Q. M >= 0.
  • N β€” INTEGER. the number of columns of the matrix Q. M >= N >= 0.
  • K β€” INTEGER. the number of elementary reflectors whose product defines the matrix Q. N >= K >= 0.
  • A β€” COMPLEX*16 array, dimension (LDA,N). on entry, the (n-k+i)-th column must contain the vector which defines the elementary reflector H(i), for i = 1,2,...,k, as returned by ZGEQLF in the last k columns of its array argument A. on exit, the M-by-N matrix Q πŸ”₯
  • LDA β€” INTEGER. the first dimension of the array A. 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 ZGEQLF.
  • WORK β€” COMPLEX*16 array, dimension (MAX(1,LWORK)). on exit, if INFO = 0, WORK(1) returns the optimal LWORK.
  • LWORK β€”
  • LWORK (INTEGER) β€” okay so this is the dimension of the WORK array, and the bare minimum is LWORK >= max(1,N). Like, that's the floor, the entry fee, the price of admission. But if you want optimum performance (and who doesn't, bestie πŸ’…), you go LWORK >= N*NB, where NB is the optimal blocksize. Treat NB like the good setting and you're golden ✨
🚨 the plot twist: if LWORK = -1, then a workspace query is assumed β€” meaning the routine doesn't actually do the thing, it just 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. So don't panic when nobody yells at you, okay? That's the whole point 🫢
  • INFO (INTEGER) β€” your little status receipt, keep it 🧾
    • = 0: successful exit. We ate. No crumbs. πŸŽ‰
    • < 0: if INFO = -i, then the i-th argument has an illegal value. So go count your arguments β€” the i-th one is being messy and it's not cute 😭

πŸ‘‘ Author πŸ‘‘

The whole thing is co-signed by:

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

Absolute legends, all of them 🌈

πŸ—‚οΈ Definition at line 127 of file zungql.f πŸ—‚οΈ

That's literally where it lives, no cap. Line 127, file zungql.f, iconic behavior only πŸ’œ

πŸ–‹οΈ Author πŸ–‹οΈ

And this section? Generated automatically by Doxygen for LAPACK from the source code. Not a human, just a very diligent little robot doing its job πŸ€–βœ¨


And that's the whole page, bestie β€” you made it to the end πŸŽ€ This gorgeousness is LAPACK Version 3.12.0, and the page itself is ungql(3). Go forth, pass your LWORK values correctly, and slay πŸ’…πŸ’–πŸ¦‹

πŸ“¦ where this page comes from