ZUNGTSQR(3)
β¨ ZUNGTSQR(3) β¨ β like, the manual for LAPACK's zungtsqr.f π
okay bestie, sit down, grab a strawberry π, because we're about to talk about a Fortran subroutine that lives at:
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/zungtsqr.f
yes that's the whole path, no I'm not shortening it, it's iconic and it's staying. π
πΈ SYNOPSIS πΈ
Functions/Subroutines:
subroutine ZUNGTSQR (m, n, mb, nb, a, lda, t, ldt, work, lwork, info)
ZUNGTSQR. that's the name, that's the vibe. π¦
π«Ά Function/Subroutine Documentation π«Ά
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, again, because she deserves a second mention. π
π Purpose π
!>
!> ZUNGTSQR 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 ZLATSQR
!>
!> Q_out = first_N_columns_of( Q(1)_in * Q(2)_in * ... * Q(k)_in ).
!>
!> See the documentation for ZLATSQR.
!>
so basically: this routine builds you an M-by-N complex matrix Q_out whose columns are orthonormal β literally the first N columns of a whole product of complex unitary matrices of order M, which ZLATSQR is the one handing over. and yes, "comlpex" is how it's spelled in the source, we do not edit the ancestors. π
if you want the full lore, go read the docs for ZLATSQR. iykyk. β¨
π Parameters π
β M
!> M is INTEGER
!> The number of rows of the matrix A. M >= 0.
!>
M is an INTEGER, the number of rows of A, and it must be M >= 0. no negative row counts, bestie, that's not a thing. π
β N
!> N is INTEGER
!> The number of columns of the matrix A. M >= N >= 0.
!>
N is an INTEGER, the number of columns of A, and the rule is M >= N >= 0. lowkey a strict little hierarchy. π
β MB
!> MB is INTEGER
!> The row block size used by ZLATSQR to return
!> arrays A and T. MB > N.
!> (Note that if MB > M, then M is used instead of MB
!> as the row block size).
!>
MB is an INTEGER, the row block size ZLATSQR used to spit out arrays A and T. requirement: MB > N. also, important lil note: if MB > M, then M gets used instead of MB as the row block size. she adapts. π¦
β NB
!> NB is INTEGER
!> The column block size used by ZLATSQR to return
!> arrays A and T. NB >= 1.
!> (Note that if NB > N, then N is used instead of NB
!> as the column block size).
!>
NB is an INTEGER, the column block size ZLATSQR used for arrays A and T. requirement: NB >= 1. and same energy as above: if NB > N, then N is used instead of NB as the column block size. πΈ
β A
!> A is COMPLEX*16 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 ZLATSQR
!> 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 ZLATSQR).
!>
!> On exit:
!>
!> The array A contains an M-by-N orthonormal matrix Q_out,
!> i.e the columns of A are orthogonal unit vectors.
!>
A is a COMPLEX*16 array with dimension (LDA,N). bestie, this one has two whole moods:
On entry β everything on and above the diagonal is not accessed (left alone, unbothered, main character energy). everything below the diagonal is the unit lower-trapezoidal blocked matrix V computed by ZLATSQR, which defines the input matrices Q_in(k) β and the ones on the diagonal are not stored. same format as the output A below the diagonal in ZLATSQR. π
On exit β A now holds an M-by-N orthonormal matrix Q_out, i.e. the columns of A are orthogonal unit vectors. we love a glow-up. π₯
β LDA
!> LDA is INTEGER
!> The leading dimension of the array A. LDA >= max(1,M).
!>
LDA is an INTEGER, the leading dimension of A, and you need LDA >= max(1,M). no exceptions, no wiggle room. π
β T
!> T is COMPLEX*16 array,
!> 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
!> = 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).
!>
okay this one's a whole paragraph so let's break it down, bestie:
Tis aCOMPLEX*16array with 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), for k=(1:NIRB*NICB). these 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. and it's the same format as the output T in ZLATSQR. i need you to understand how much is happening in one array. π
β LDT
!> LDT is INTEGER
!> The leading dimension of the array T.
!> LDT >= max(1,min(NB1,N)).
!>
LDT is an INTEGER, the leading dimension of T, and the rule is LDT >= max(1,min(NB1,N)) β and yes, it's written exactly like that, NB1 and all. we don't question the ancestors. π
β WORK
!> (workspace) COMPLEX*16 array, dimension (MAX(2,LWORK))
!> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
!>
WORK is the workspace, a COMPLEX*16 array with dimension (MAX(2,LWORK)). on exit, if INFO = 0, then WORK(1) returns the optimal LWORK. she tells you how much room she actually wanted. π«Ά
β LWORK
!> LWORK is INTEGER
!> The dimension of the array WORK. LWORK >= (M+NB)*N.
!> 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.
!>
LWORK is an INTEGER, the dimension of the WORK array, and LWORK >= (M+NB)*N. now listen closely bestie: if LWORK = -1, then a workspace query is assumed β the routine only calculates the optimal size of the WORK array, returns that value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA. so like, it's not being shady, it's just answering a question. π
β INFO
!> INFO is INTEGER
!> = 0: successful exit
!> < 0: if INFO = -i, the i-th argument had an illegal value
!>
INFO is an INTEGER and it's the mood ring of the whole call:
= 0: successful exit, we ate. π₯< 0: ifINFO = -i, the i-th argument had an illegal value. somebody fumbled. π
π Author π
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
four whole institutions, periodt. π
π Contributors π
!>
!> November 2019, Igor Kozachenko,
!> Computer Science Division,
!> University of California, Berkeley
!>
!>
shoutout to Igor, November 2019, Computer Science Division, University of California, Berkeley. π«Ά
Definition at line 174 of file zungtsqr.f. yes, line 174, we counted. β¨
π Author π
Generated automatically by Doxygen for LAPACK from the source code. it wasn't even hand-written, it's born this way. iconic. π
and that's the whole page, bestie!! π this gorgeous thing is LAPACK, Version 3.12.0, and the date on the tin is the same as the file path up top: /home/abui.../zungtsqr.f(3). slay, go forth and generate those orthonormal columns. π¦πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms