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 matrixQ. Constraint:M >= 0. πNβINTEGER. The number of columns of the matrixQ. Constraint:M >= N >= 0. β¨KβINTEGER. The number of elementary reflectors whose product defines the matrixQ. Constraint:N >= K >= 0. πAβCOMPLEXarray, dimension(LDA,N). On entry, the i-th column must contain the vector which defines the elementary reflectorH(i), fori = 1,2,...,k, as returned byCGEQRFin the firstkcolumns of its array argumentA. On exit? Boom π₯ β the M-by-N matrixQ.LDAβINTEGER. The first dimension of the arrayA. Constraint:LDA >= max(1,M). Don't try it with anything smaller, fr π«ΆTAUβCOMPLEXarray, dimension(K).TAU(i)must contain the scalar factor of the elementary reflectorH(i), as returned byCGEQRF. The receipts from last time, basically π§ΎWORKβCOMPLEXarray, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK. She tells you what she actually needed πLWORKβINTEGER. The dimension of the arrayWORK. Constraint:LWORK >= max(1,N). For optimum performance,LWORK >= 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. So-1is the "just tell me how much room you need, bestie" mode π
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 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 matrixQ. Constraint:M >= 0. πNβINTEGER. The number of columns of the matrixQ. Constraint:M >= N >= 0. β¨KβINTEGER. The number of elementary reflectors whose product defines the matrixQ. Constraint:N >= K >= 0. πAβDOUBLE PRECISIONarray, dimension(LDA,N). On entry, the i-th column must contain the vector which defines the elementary reflectorH(i), fori = 1,2,...,k, as returned byDGEQRFin the firstkcolumns of its array argumentA. On exit, the M-by-N matrixQπ¦LDAβINTEGER. The first dimension of the arrayA. Constraint:LDA >= max(1,M). π«ΆTAUβDOUBLE PRECISIONarray, dimension(K).TAU(i)must contain the scalar factor of the elementary reflectorH(i), as returned byDGEQRF. π§ΎWORKβDOUBLE PRECISIONarray, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK. πLWORKβINTEGER. The dimension of the arrayWORK. Constraint:LWORK >= max(1,N). For optimum performance,LWORK >= 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 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 matrixQ. Constraint:M >= 0. πNβINTEGER. The number of columns of the matrixQ. Constraint:M >= N >= 0. β¨KβINTEGER. The number of elementary reflectors whose product defines the matrixQ. Constraint:N >= K >= 0. πAβREALarray, dimension(LDA,N). On entry, the i-th column must contain the vector which defines the elementary reflectorH(i), fori = 1,2,...,k, as returned bySGEQRFin the firstkcolumns of its array argumentA. On exit, the M-by-N matrixQπ¦LDAβINTEGER. The first dimension of the arrayA. Constraint:LDA >= max(1,M). π«ΆTAUβREALarray, dimension(K).TAU(i)must contain the scalar factor of the elementary reflectorH(i), as returned bySGEQRF. π§ΎWORKβREALarray, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK. πLWORKβINTEGER. The dimension of the arrayWORK. Constraint:LWORK >= max(1,N). For optimum performance,LWORK >= 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 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 matrixQ. Constraint:M >= 0. πNβINTEGER. The number of columns of the matrixQ. Constraint:M >= N >= 0. β¨KβINTEGER. The number of elementary reflectors whose product defines the matrixQ. Constraint:N >= K >= 0. πAβCOMPLEX*16array, dimension(LDA,N). On entry, the i-th column must contain the vector which defines the elementary reflectorH(i), fori = 1,2,...,k, as returned byZGEQRFin the firstkcolumns of its array argumentA. On exit, the M-by-N matrixQπ¦LDAβINTEGER. The first dimension of the arrayA. Constraint:LDA >= max(1,M). π«ΆTAUβCOMPLEX*16array, dimension(K).TAU(i)must contain the scalar factor of the elementary reflectorH(i), as returned byZGEQRF. π§ΎWORKβCOMPLEX*16array, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK. πLWORKβLWORKβ INTEGER, bestie, and it's literally the dimension of the arrayWORK. The rule isLWORK >= max(1,N). For optimum performance,LWORK >= 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, the exit vibe check.= 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 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
- 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