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 matrixQ.M >= 0.NβINTEGER. the number of columns of the matrixQ.M >= N >= 0.KβINTEGER. the number of elementary reflectors whose product defines the matrixQ.N >= K >= 0.AβCOMPLEXarray, dimension(LDA,N). on entry, the(n-k+i)-th column must contain the vector which defines the elementary reflectorH(i), fori = 1,2,...,k, as returned byCGEQLFin the lastkcolumns of its array argumentA. on exit? it's theM-by-NmatrixQ. glow-up complete β¨LDAβINTEGER. the first dimension of the arrayA.LDA >= max(1,M).TAUβCOMPLEXarray, dimension(K).TAU(i)must contain the scalar factor of the elementary reflectorH(i), as returned byCGEQLF.WORKβCOMPLEXarray, dimension(MAX(1,LWORK)). on exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKβINTEGER. the dimension of the arrayWORK.LWORK >= max(1,N). for optimum performanceLWORK >= N*NB, whereNBis the optimal blocksize. and listen: ifLWORK = -1, then a workspace query is assumed β the routine only calculates the optimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA. cute little dry-run moment πINFOβINTEGER.= 0: successful exit.< 0: ifINFO = -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 matrixQ.M >= 0.NβINTEGER. the number of columns of the matrixQ.M >= N >= 0.KβINTEGER. the number of elementary reflectors whose product defines the matrixQ.N >= K >= 0.AβDOUBLE PRECISIONarray, dimension(LDA,N). on entry, the(n-k+i)-th column must contain the vector which defines the elementary reflectorH(i), fori = 1,2,...,k, as returned byDGEQLFin the lastkcolumns of its array argumentA. on exit, theM-by-NmatrixQπLDAβINTEGER. the first dimension of the arrayA.LDA >= max(1,M).TAUβDOUBLE PRECISIONarray, dimension(K).TAU(i)must contain the scalar factor of the elementary reflectorH(i), as returned byDGEQLF.WORKβDOUBLE PRECISIONarray, dimension(MAX(1,LWORK)). on exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKβINTEGER. the dimension of the arrayWORK.LWORK >= max(1,N). for optimum performanceLWORK >= N*NB, whereNBis the optimal blocksize. ifLWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA.INFOβINTEGER.= 0: successful exit.< 0: ifINFO = -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 matrixQ.M >= 0.NβINTEGER. the number of columns of the matrixQ.M >= N >= 0.KβINTEGER. the number of elementary reflectors whose product defines the matrixQ.N >= K >= 0.AβREALarray, dimension(LDA,N). on entry, the(n-k+i)-th column must contain the vector which defines the elementary reflectorH(i), fori = 1,2,...,k, as returned bySGEQLFin the lastkcolumns of its array argumentA. on exit, theM-by-NmatrixQπΈLDAβINTEGER. the first dimension of the arrayA.LDA >= max(1,M).TAUβREALarray, dimension(K).TAU(i)must contain the scalar factor of the elementary reflectorH(i), as returned bySGEQLF.WORKβREALarray, dimension(MAX(1,LWORK)). on exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKβINTEGER. the dimension of the arrayWORK.LWORK >= max(1,N). for optimum performanceLWORK >= N*NB, whereNBis the optimal blocksize. ifLWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA.INFOβINTEGER.= 0: successful exit.< 0: ifINFO = -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 matrixQ.M >= 0.NβINTEGER. the number of columns of the matrixQ.M >= N >= 0.KβINTEGER. the number of elementary reflectors whose product defines the matrixQ.N >= K >= 0.AβCOMPLEX*16array, dimension(LDA,N). on entry, the(n-k+i)-th column must contain the vector which defines the elementary reflectorH(i), fori = 1,2,...,k, as returned byZGEQLFin the lastkcolumns of its array argumentA. on exit, theM-by-NmatrixQπ₯LDAβINTEGER. the first dimension of the arrayA.LDA >= max(1,M).TAUβCOMPLEX*16array, dimension(K).TAU(i)must contain the scalar factor of the elementary reflectorH(i), as returned byZGEQLF.WORKβCOMPLEX*16array, dimension(MAX(1,LWORK)). on exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKβLWORK(INTEGER) β okay so this is the dimension of theWORKarray, and the bare minimum isLWORK >= 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 goLWORK >= N*NB, whereNBis the optimal blocksize. TreatNBlike the good setting and you're golden β¨
π¨ the plot twist: ifLWORK = -1, then a workspace query is assumed β meaning the routine doesn't actually do the thing, it just calculates the optimal size of theWORKarray, returns that value as the first entry ofWORK, and no error message related toLWORKis issued byXERBLA. 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:ifINFO = -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
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms