ungtsqr(3)
π¦ NAME π¦
okay so this is ungtsqr β that's ungtsqr(3), straight out of the Library Functions Manual, bestie π
β and it does one iconic job:
ungtsqr - {un,or}gtsqr: generate Q from latsqr
that's it, that's the whole vibe. it takes the stuff latsqr left behind and hands you the Q matrix. slay. β¨
β¨ SYNOPSIS β¨
π Functions
here's the whole squad, all four flavours, same exact signature energy:
subroutine cungtsqr (m, n, mb, nb, a, lda, t, ldt, work, lwork, info)
CUNGTSQR
subroutine dorgtsqr (m, n, mb, nb, a, lda, t, ldt, work, lwork, info)
DORGTSQR
subroutine sorgtsqr (m, n, mb, nb, a, lda, t, ldt, work, lwork, info)
SORGTSQR
subroutine zungtsqr (m, n, mb, nb, a, lda, t, ldt, work, lwork, info)
ZUNGTSQR
cungtsqrβ CUNGTSQR, theCOMPLEXone πdorgtsqrβ DORGTSQR, theDOUBLE PRECISIONone πsorgtsqrβ SORGTSQR, theREALone πzungtsqrβ ZUNGTSQR, theZone, showing up last like the main character it is π
π₯ Detailed Description π₯
(the original page literally has this heading with nothing under it. iconic minimalism honestly. nothing to report, moving on π«Ά)
π Function Documentation π
π CUNGTSQR
subroutine cungtsqr (integer m, integer n, integer mb, integer nb, complex,
dimension( lda, * ) a, integer lda, complex, dimension( ldt, * ) t,
integer ldt, complex, dimension( * ) work, integer lwork, integer info)
πΈ Purpose
so what does it actually do? it generates an M-by-N complex matrix Q_out with orthonormal columns β and those columns are the first N columns of a product of complex unitary matrices of order M, the ones that CLATSQR handed back. the whole thing, verbatim:
!>
!> CUNGTSQR generates an M-by-N complex matrix Q_out with orthonormal
!> columns, which are the first N columns of a product of comlpex unitary
!> matrices of order M which are returned by CLATSQR
!>
!> Q_out = first_N_columns_of( Q(1)_in * Q(2)_in * ... * Q(k)_in ).
!>
!> See the documentation for CLATSQR.
!>
(yes, "comlpex" is in the original. i'm not touching it. it's part of the lore now π)
π Parameters
- M β
Mis INTEGER. the number of rows of the matrixA.M >= 0. - N β
Nis INTEGER. the number of columns of the matrixA.M >= N >= 0. - MB β
MBis INTEGER. the row block size thatCLATSQRused to return the arraysAandT.MB > N. (heads up: ifMB > M, thenMis used instead ofMBas the row block size.) - NB β
NBis INTEGER. the column block size thatCLATSQRused to return the arraysAandT.NB >= 1. (heads up again: ifNB > N, thenNis used instead ofNBas the column block size.) - A β
Ais COMPLEX array, dimension(LDA,N).
On entry: the elements on and above the diagonal are simply not accessed. the elements below the diagonal represent the unit lower-trapezoidal blocked matrix V computed by CLATSQR that defines the input matrices Q_in(k) β and ngl, the ones on the diagonal are not stored. (same format as the output A below the diagonal in CLATSQR.)
On exit: A now contains an M-by-N orthonormal matrix Q_out, i.e. the columns of A are orthogonal unit vectors. glow up complete β¨
- LDA β
LDAis INTEGER. the leading dimension of the arrayA.LDA >= max(1,M). - T β
Tis COMPLEX array, dimension(LDT, N * NIRB), where:
NIRB = Number_of_input_row_blocks
= MAX( 1, CEIL((M-N)/(MB-N)) )
and let
NICB = Number_of_input_col_blocks
= CEIL(N/NB)
T holds the upper-triangular block reflectors used to define the input matrices Q_in(k), where k=(1:NIRB*NICB). the block reflectors are stored in compact form in NIRB block reflector sequences β each of those NIRB block reflector sequences lives in a larger NB-by-N column block of T, and consists of NICB smaller NB-by-NB upper-triangular column blocks. (same format as the output T in CLATSQR.)
- LDT β
LDTis INTEGER. the leading dimension of the arrayT.LDT >= max(1,min(NB1,N)). - WORK β (workspace) COMPLEX array, dimension
(MAX(2,LWORK)). on exit, ifINFO = 0,WORK(1)returns the optimalLWORK. π«Ά - LWORK β
LWORKis INTEGER. the dimension of the arrayWORK.LWORK >= (M+NB)*N. ifLWORK = -1, then a workspace query is assumed β the routine only calculates the optimal size of theWORKarray, returns that value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA. so cute of it. - INFO β
INFOis INTEGER.= 0: successful exit π< 0: ifINFO = -i, the i-th argument had an illegal value π
π§ Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
π Contributors
!>
!> November 2019, Igor Kozachenko,
!> Computer Science Division,
!> University of California, Berkeley
!>
!>
Definition at line 174 of file cungtsqr.f.
π DORGTSQR
subroutine dorgtsqr (integer m, integer n, integer mb, integer nb, double
precision, dimension( lda, * ) a, integer lda, double precision,
dimension( ldt, * ) t, integer ldt, double precision, dimension( * )
work, integer lwork, integer info)
π Purpose
same mission, real numbers this time: it generates an M-by-N real matrix Q_out with orthonormal columns, which are the first N columns of a product of real orthogonal matrices of order M returned by DLATSQR. verbatim:
!>
!> DORGTSQR generates an M-by-N real matrix Q_out with orthonormal columns,
!> which are the first N columns of a product of real orthogonal
!> matrices of order M which are returned by DLATSQR
!>
!> Q_out = first_N_columns_of( Q(1)_in * Q(2)_in * ... * Q(k)_in ).
!>
!> See the documentation for DLATSQR.
!>
π Parameters
- M β
Mis INTEGER. the number of rows of the matrixA.M >= 0. - N β
Nis INTEGER. the number of columns of the matrixA.M >= N >= 0. - MB β
MBis INTEGER. the row block size used byDLATSQRto return arraysAandT.MB > N. (note: ifMB > M, thenMis used instead ofMBas the row block size.) - NB β
NBis INTEGER. the column block size used byDLATSQRto return arraysAandT.NB >= 1. (note: ifNB > N, thenNis used instead ofNBas the column block size.) - A β
Ais DOUBLE PRECISION array, dimension(LDA,N).
On entry: the elements on and above the diagonal are not accessed. the elements below the diagonal represent the unit lower-trapezoidal blocked matrix V computed by DLATSQR that defines the input matrices Q_in(k) (ones on the diagonal are not stored) (same format as the output A below the diagonal in DLATSQR).
On exit: the array A contains an M-by-N orthonormal matrix Q_out, i.e. the columns of A are orthogonal unit vectors.
- LDA β
LDAis INTEGER. the leading dimension of the arrayA.LDA >= max(1,M). - T β
Tis DOUBLE PRECISION array, dimension(LDT, N * NIRB), where:
NIRB = Number_of_input_row_blocks
= MAX( 1, CEIL((M-N)/(MB-N)) )
and let
NICB = Number_of_input_col_blocks
= CEIL(N/NB)
T holds the upper-triangular block reflectors used to define the input matrices Q_in(k), k=(1:NIRB*NICB). the block reflectors are stored in compact form in NIRB block reflector sequences. each of the NIRB block reflector sequences is stored in a larger NB-by-N column block of T and consists of NICB smaller NB-by-NB upper-triangular column blocks. (same format as the output T in DLATSQR.)
- LDT β
LDTis INTEGER. the leading dimension of the arrayT.LDT >= max(1,min(NB1,N)). - WORK β (workspace) DOUBLE PRECISION array, dimension
(MAX(2,LWORK)). on exit, ifINFO = 0,WORK(1)returns the optimalLWORK. - LWORK β
LWORKis INTEGER. the dimension of the arrayWORK.LWORK >= (M+NB)*N. 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 β
INFOis INTEGER.= 0: successful exit< 0: ifINFO = -i, the i-th argument had an illegal value
π§ Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
π Contributors
!>
!> November 2019, Igor Kozachenko,
!> Computer Science Division,
!> University of California, Berkeley
!>
!>
Definition at line 174 of file dorgtsqr.f.
π SORGTSQR
subroutine sorgtsqr (integer m, integer n, integer mb, integer nb, real,
dimension( lda, * ) a, integer lda, real, dimension( ldt, * ) t, integer
ldt, real, dimension( * ) work, integer lwork, integer info)
π Purpose
real-numbers edition, single precision, still eating: it generates an M-by-N real matrix Q_out with orthonormal columns, which are the first N columns of a product of real orthogonal matrices of order M returned by SLATSQR. here it is verbatim:
!>
!> SORGTSQR generates an M-by-N real matrix Q_out with orthonormal columns,
!> which are the first N columns of a product of real orthogonal
!> matrices of order M which are returned by SLATSQR
!>
!> Q_out = first_N_columns_of( Q(1)_in * Q(2)_in * ... * Q(k)_in ).
!>
!> See the documentation for SLATSQR.
!>
π Parameters
- M β
Mis INTEGER. the number of rows of the matrixA.M >= 0. - N β
Nis INTEGER. the number of columns of the matrixA.M >= N >= 0. - MB β
MBis INTEGER. the row block size used bySLATSQRto return arraysAandT.MB > N. (note: ifMB > M, thenMis used instead ofMBas the row block size). - NB
NBβ INTEGER, the column block size thatSLATSQRused to hand back arraysAandT. Bestie, listen:NB >= 1. And heads up β ifNB > N, thenNgets used instead ofNBas the column block size. The routine just quietly does that. iykyk. πAβ REAL array, dimension(LDA,N).
On entry:
- The elements on and above the diagonal are not accessed. Not even a little peek. π
- The elements below the diagonal represent the unit lower-trapezoidal blocked matrix
Vcomputed bySLATSQRthat defines the input matricesQ_in(k)(ones on the diagonal are not stored) (same format as the outputAbelow the diagonal inSLATSQR).
On exit:
- The array
Acontains anM-by-Northonormal matrixQ_out, i.e the columns ofAare orthogonal unit vectors. iconic behaviour, honestly β¨
LDAβ INTEGER, the leading dimension of the arrayA.LDA >= max(1,M). No notes, just vibes and a hard lower bound πTβ REAL array, dimension(LDT, N * NIRB)where
NIRB = Number_of_input_row_blocks
= MAX( 1, CEIL((M-N)/(MB-N)) )
and let NICB = Number_of_input_col_blocks
NICB = CEIL(N/NB)
This is the home of the upper-triangular block reflectors used to define the input matrices Q_in(k), k=(1:NIRB*NICB). The block reflectors are stored in compact form in NIRB block reflector sequences. Each of the NIRB block reflector sequences is stored in a larger NB-by-N column block of T and consists of NICB smaller NB-by-NB upper-triangular column blocks. (same format as the output T in SLATSQR). It's giving nested boxes, it's giving matryoshka, it's giving compactly stored π
LDTβ INTEGER, the leading dimension of the arrayT.LDT >= max(1,min(NB1,N)). copy that boundary exactly, bestie, don't get creative with it π«ΆWORKβ (workspace) REAL array, dimension(MAX(2,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK. The workspace is snitching on itself and honestly? We love a self-aware array βLWORKβ INTEGER, the dimension of the arrayWORK.LWORK >= (M+NB)*N. 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 I need" era, no scolding fromXERBLAπINFOβ INTEGER.= 0: successful exit πΈ< 0: ifINFO = -i, the i-th argument had an illegal value. Somebody fumbled the bag at positioniπ
Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Contributors:
November 2019, Igor Kozachenko, Computer Science Division, University of California, Berkeley
Definition at line 174 of file sorgtsqr.f. yes, sorgtsqr.f, line 174, we said what we said π
zungtsqr β the COMPLEX*16 sibling π
Look at her. Same routine, but make it complex.
subroutine zungtsqr (integer m, integer n, integer mb, integer nb,
complex*16, dimension( lda, * ) a, integer lda, complex*16, dimension(
ldt, * ) t, integer ldt, complex*16, dimension( * ) work, integer lwork,
integer info)
ZUNGTSQR
Purpose:
ZUNGTSQR generates an M-by-N complex matrix Q_out with orthonormal columns, which are the first N columns of a product of complex unitary matrices of order M which are returned by ZLATSQR
Q_out = first_N_columns_of( Q(1)_in * Q(2)_in * ... * Q(k)_in ).
See the documentation for ZLATSQR. Go read it, bestie, it's the whole backstory π
Parameters
Mβ INTEGER, the number of rows of the matrixA.M >= 0. Zero is allowed, she's flexible like that πNβ INTEGER, the number of columns of the matrixA.M >= N >= 0. Sandwich constraint, no notes β¨MBβ INTEGER, the row block size used byZLATSQRto return arraysAandT.MB > N. (Note that ifMB > M, thenMis used instead ofMBas the row block size). Same cute little substitution deal as always πNBβ INTEGER, the column block size used byZLATSQRto return arraysAandT.NB >= 1. (Note that ifNB > N, thenNis used instead ofNBas the column block size). She's not going to use a block size bigger than the whole matrix, be serious πAβCOMPLEX*16array, dimension(LDA,N).
On entry:
- The elements on and above the diagonal are not accessed. Untouched. Ignored. Not her business π
- The elements below the diagonal represent the unit lower-trapezoidal blocked matrix
Vcomputed byZLATSQRthat defines the input matricesQ_in(k)(ones on the diagonal are not stored) (same format as the outputAbelow the diagonal inZLATSQR).
On exit:
- The array
Acontains anM-by-Northonormal matrixQ_out, i.e the columns ofAare orthogonal unit vectors. she ate and left no crumbs π₯
LDAβ INTEGER, the leading dimension of the arrayA.LDA >= max(1,M). Respect the bound π«ΆTβCOMPLEX*16array, dimension(LDT, N * NIRB)where
NIRB = Number_of_input_row_blocks
= MAX( 1, CEIL((M-N)/(MB-N)) )
Let NICB = Number_of_input_col_blocks
NICB = CEIL(N/NB)
The upper-triangular block reflectors used to define the input matrices Q_in(k), k=(1:NIRB*NICB). The block reflectors are stored in compact form in NIRB block reflector sequences. Each of NIRB block reflector sequences is stored in a larger NB-by-N column block of T and consists of NICB smaller NB-by-NB upper-triangular column blocks. (same format as the output T in ZLATSQR). Same nesting, same drama, now with complex numbers π¦
LDTβ INTEGER, the leading dimension of the arrayT.LDT >= max(1,min(NB1,N)). Again βNB1, exactly like that, do not touch π―WORKβ (workspace)COMPLEX*16array, dimension(MAX(2,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK. She tells you what she needs upfront, queen behaviour πLWORKβ INTEGER, the dimension of the arrayWORK.LWORK >= (M+NB)*N. 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. Query mode = zero judgment fromXERBLA, we stan π§INFOβ INTEGER.= 0: successful exit β< 0: ifINFO = -i, the i-th argument had an illegal value. Argumentiis in trouble, not you, probably π
Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Contributors:
November 2019, Igor Kozachenko, Computer Science Division, University of California, Berkeley
Definition at line 174 of file zungtsqr.f. line 174 again β poetic symmetry, lowkey obsessed π
Author
Generated automatically by Doxygen for LAPACK from the source code. Not a human, not a vibe curator, just Doxygen doing Doxygen things π€β¨
And that's the whole page, bestie β this was LAPACK, Version 3.12.0, the ungtsqr(3) manual page, dated the way the footer says it. Go forth and generate your orthonormal columns. 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