unbdb4(3)
β¨ NAME β¨
okay so bestie, this page is unbdb4(3) and it documents {un,or}bdb4, which is literally a step in uncsd2by1. that's the name, that's the whole vibe. short and iconic. π
π SYNOPSIS π
Functions
these are the four glow-ups of the same routine, one per precision/flavour. all of them have the exact same argument list, no cap:
subroutine cunbdb4 (m, p, q, x11, ldx11, x21, ldx21, theta, phi, taup1,
taup2, tauq1, phantom, work, lwork, info)
CUNBDB4
subroutine dorbdb4 (m, p, q, x11, ldx11, x21, ldx21, theta, phi, taup1,
taup2, tauq1, phantom, work, lwork, info)
DORBDB4
subroutine sorbdb4 (m, p, q, x11, ldx11, x21, ldx21, theta, phi, taup1,
taup2, tauq1, phantom, work, lwork, info)
SORBDB4
subroutine zunbdb4 (m, p, q, x11, ldx11, x21, ldx21, theta, phi, taup1,
taup2, tauq1, phantom, work, lwork, info)
ZUNBDB4
π¦ Detailed Description π¦
bestie. buckle up. we got the Function Documentation for all four of them, one after another. they're twins. quadruplets, actually. the only thing that changes is the type of the arrays (real vs complex) and the word "orthogonal" vs "unitary". everything else is copy-paste behaviour, which honestly? slay, consistency is a love language. π«Ά
πΈ subroutine cunbdb4 πΈ
subroutine cunbdb4 (integer m, integer p, integer q, complex,
dimension(ldx11,*) x11, integer ldx11, complex, dimension(ldx21,*) x21,
integer ldx21, real, dimension(*) theta, real, dimension(*) phi,
complex, dimension(*) taup1, complex, dimension(*) taup2, complex,
dimension(*) tauq1, complex, dimension(*) phantom, complex, dimension(*)
work, integer lwork, integer info)
CUNBDB4
π Purpose:
okay so the whole assignment here: CUNBDB4 simultaneously bidiagonalizes the blocks of a tall and skinny matrix X with orthonormal columns. and when i say simultaneously i mean it does the whole little dance in one go:
[ B11 ]
[ X11 ] [ P1 | ] [ 0 ]
[-----] = [---------] [-----] Q1**T .
[ X21 ] [ | P2 ] [ B21 ]
[ 0 ]
X11 is P-by-Q, and X21 is (M-P)-by-Q. M-Q must be no larger than P, M-P, or Q. and listen β CUNBDB1, CUNBDB2, and CUNBDB3 handle the cases where M-Q is not the minimum dimension. so if you're in one of those cases you are on the wrong page, bestie, go find your own routine. π
the unitary matrices P1, P2, and Q1 are P-by-P, (M-P)-by-(M-P), and (M-Q)-by-(M-Q), respectively. they're represented implicitly by Householder vectors β not stored out loud, that's the whole point, we're being efficient here.
B11 and B12 are (M-Q)-by-(M-Q) bidiagonal matrices represented implicitly by angles THETA, PHI.
β¨ Parameters β¨
MβMisINTEGER. the number of rows inX11plus the number of rows inX21. that's the total row count, she's the whole height.PβPisINTEGER. the number of rows inX11. constraint:0 <= P <= M. πQβQisINTEGER. the number of columns inX11andX21. constraint:0 <= Q <= MandM-Q <= min(P,M-P,Q). that second one is not optional, it's the whole reason this routine (and not its siblings) is the one you want.X11βX11isCOMPLEXarray, dimension(LDX11,Q). on entry, it's the top block of the matrix X to be reduced. on exit, the columns oftril(X11)specify reflectors forP1and the rows oftriu(X11,1)specify reflectors forQ1. yes she gets rewritten in place, that's the deal. πLDX11βLDX11isINTEGER. the leading dimension ofX11. must beLDX11 >= P.X21βX21isCOMPLEXarray, dimension(LDX21,Q). on entry, the bottom block of the matrix X to be reduced. on exit, the columns oftril(X21)specify reflectors forP2.LDX21βLDX21isINTEGER. the leading dimension ofX21. must beLDX21 >= M-P.THETAβTHETAisREALarray, dimension(Q). the entries of the bidiagonal blocksB11,B21are defined byTHETAandPHI. see Further Details below, i promise it's cute.PHIβPHIisREALarray, dimension(Q-1). yeah, one shorter thanTHETA, that's not a typo. the entries of the bidiagonal blocksB11,B21are defined byTHETAandPHI. see Further Details.TAUP1βTAUP1isCOMPLEXarray, dimension(M-Q). the scalar factors of the elementary reflectors that defineP1.TAUP2βTAUP2isCOMPLEXarray, dimension(M-Q). the scalar factors of the elementary reflectors that defineP2.TAUQ1βTAUQ1isCOMPLEXarray, dimension(Q). the scalar factors of the elementary reflectors that defineQ1.PHANTOMβPHANTOMisCOMPLEXarray, dimension(M). the routine computes an M-by-1 column vectorYthat is orthogonal to the columns of[ X11; X21 ].PHANTOM(1:P)andPHANTOM(P+1:M)contain Householder vectors forY(1:P)andY(P+1:M), respectively. spooky name, extremely real job. π»WORKβWORKisCOMPLEXarray, dimension(LWORK).LWORKβLWORKisINTEGER. the dimension of the arrayWORK. constraint:LWORK >= M-Q.
okay important one: 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 don't panic when nothing yells at you, that's the intended behaviour. π
INFOβINFOisINTEGER.= 0: successful exit. we love a clean run. β¨< 0: ifINFO = -i, the i-th argument had an illegal value. bestie you passed something cursed, check argument number i.
π Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
π Further Details:
the upper-bidiagonal blocks B11, B21 are represented implicitly by angles THETA(1), ..., THETA(Q) and PHI(1), ..., PHI(Q-1). every entry in each bidiagonal band is a product of a sine or cosine of a THETA with a sine or cosine of a PHI. see [1] or CUNCSD for details. it's giving trigonometry but make it structural. π§
P1, P2, and Q1 are represented as products of elementary reflectors. see CUNCSD2BY1 for details on generating P1, P2, and Q1 using CUNGQR and CUNGLQ.
π References:
[1] Brian D. Sutton. Computing the complete CS decomposition. Numer. Algorithms, 50(1):33-65, 2009.
Definition at line 210 of file cunbdb4.f.
π subroutine dorbdb4 π
subroutine dorbdb4 (integer m, integer p, integer q, double precision,
dimension(ldx11,*) x11, integer ldx11, double precision,
dimension(ldx21,*) x21, integer ldx21, double precision, dimension(*)
theta, double precision, dimension(*) phi, double precision,
dimension(*) taup1, double precision, dimension(*) taup2, double
precision, dimension(*) tauq1, double precision, dimension(*) phantom,
double precision, dimension(*) work, integer lwork, integer info)
DORBDB4
π Purpose:
DORBDB4 simultaneously bidiagonalizes the blocks of a tall and skinny matrix X with orthonormal columns:
[ B11 ]
[ X11 ] [ P1 | ] [ 0 ]
[-----] = [---------] [-----] Q1**T .
[ X21 ] [ | P2 ] [ B21 ]
[ 0 ]
X11 is P-by-Q, and X21 is (M-P)-by-Q. M-Q must be no larger than P, M-P, or Q. DORBDB1, DORBDB2, and DORBDB3 handle cases in which M-Q is not the minimum dimension. same rule as before, no exceptions. π€
the orthogonal matrices P1, P2, and Q1 are P-by-P, (M-P)-by-(M-P), and (M-Q)-by-(M-Q), respectively. they are represented implicitly by Householder vectors.
B11 and B12 are (M-Q)-by-(M-Q) bidiagonal matrices represented implicitly by angles THETA, PHI.
β¨ Parameters β¨
MβMisINTEGER. the number of rowsX11plus the number of rows inX21.PβPisINTEGER. the number of rows inX11. constraint:0 <= P <= M.QβQisINTEGER. the number of columns inX11andX21. constraint:0 <= Q <= MandM-Q <= min(P,M-P,Q).X11βX11isDOUBLE PRECISIONarray, dimension(LDX11,Q). on entry, the top block of the matrix X to be reduced. on exit, the columns oftril(X11)specify reflectors forP1and the rows oftriu(X11,1)specify reflectors forQ1.LDX11βLDX11isINTEGER. the leading dimension ofX11. must beLDX11 >= P.X21βX21isDOUBLE PRECISIONarray, dimension(LDX21,Q). on entry, the bottom block of the matrix X to be reduced. on exit, the columns oftril(X21)specify reflectors forP2.LDX21βLDX21isINTEGER. the leading dimension ofX21. must beLDX21 >= M-P.THETAβTHETAisDOUBLE PRECISIONarray, dimension(Q). the entries of the bidiagonal blocksB11,B21are defined byTHETAandPHI. see Further Details.PHIβPHIisDOUBLE PRECISIONarray, dimension(Q-1). the entries of the bidiagonal blocksB11,B21are defined byTHETAandPHI. see Further Details.TAUP1βTAUP1isDOUBLE PRECISIONarray, dimension(M-Q). the scalar factors of the elementary reflectors that defineP1.TAUP2βTAUP2isDOUBLE PRECISIONarray, dimension(M-Q). the scalar factors of the elementary reflectors that defineP2.TAUQ1βTAUQ1isDOUBLE PRECISIONarray, dimension(Q). the scalar factors of the elementary reflectors that defineQ1.PHANTOMβPHANTOMisDOUBLE PRECISIONarray, dimension(M). the routine computes an M-by-1 column vectorYthat is orthogonal to the columns of[ X11; X21 ].PHANTOM(1:P)andPHANTOM(P+1:M)contain Householder vectors forY(1:P)andY(P+1:M), respectively.WORKβWORKisDOUBLE PRECISIONarray, dimension(LWORK).LWORKβLWORKisINTEGER. the dimension of the arrayWORK. constraint:LWORK >= M-Q.
again for the cheap seats: 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. π
INFOINFOβINTEGER, and this is literally the receipts of how the call went, bestie:= 0β successful exit π everything ate, no notes.< 0β ifINFO = -i, the i-th argument had an illegal value π so like, argument number i showed up to the function wearing the wrong fit.
π Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
(the academic icon squad, no cap π)
β¨ Further Details:
- The upper-bidiagonal blocks
B11,B21are represented implicitly by anglesTHETA(1), ...,THETA(Q)andPHI(1), ...,PHI(Q-1). Every entry in each bidiagonal band is a product of a sine or cosine of aTHETAwith a sine or cosine of aPHI. See [1] orDORCSDfor details. π¦ P1,P2, andQ1are represented as products of elementary reflectors. SeeDORCSD2BY1for details on generatingP1,P2, andQ1usingDORGQRandDORGLQ. β¨
π References:
[1] Brian D. Sutton. Computing the complete CS decomposition. Numer. Algorithms, 50(1):33-65, 2009.
Definition at line 210 of file dorbdb4.f.
π subroutine sorbdb4 (integer m, integer p, integer q, real, dimension(ldx11,) x11, integer ldx11, real, dimension(ldx21,) x21, integer ldx21, real, dimension() theta, real, dimension() phi, real, dimension() taup1, real, dimension() taup2, real, dimension() tauq1, real, dimension() phantom, real, dimension(*) work, integer lwork, integer info)
subroutine sorbdb4 (integer m, integer p, integer q, real,
dimension(ldx11,*) x11, integer ldx11, real, dimension(ldx21,*) x21,
integer ldx21, real, dimension(*) theta, real, dimension(*) phi, real,
dimension(*) taup1, real, dimension(*) taup2, real, dimension(*) tauq1,
real, dimension(*) phantom, real, dimension(*) work, integer lwork,
integer info)
SORBDB4 β okay so this is the single-precision version of DORBDB4, and it's doing the exact same glow-up, just in REAL. β¨
π Purpose:
SORBDB4 simultaneously bidiagonalizes the blocks of a tall and skinny matrix X with orthonormal columns:
[ B11 ]
[ X11 ] [ P1 | ] [ 0 ]
[-----] = [---------] [-----] Q1**T .
[ X21 ] [ | P2 ] [ B21 ]
[ 0 ]
X11 is P-by-Q, and X21 is (M-P)-by-Q. M-Q must be no larger than P, M-P, or Q. Routines SORBDB1, SORBDB2, and SORBDB3 handle cases in which M-Q is not the minimum dimension. π«Ά
The orthogonal matrices P1, P2, and Q1 are P-by-P, (M-P)-by-(M-P), and (M-Q)-by-(M-Q), respectively. They are represented implicitly by Householder vectors. π
B11 and B12 are (M-Q)-by-(M-Q) bidiagonal matrices represented implicitly by angles THETA, PHI. β
π Parameters
MβINTEGER. The number of rowsX11plus the number of rows inX21.PβINTEGER. The number of rows inX11.0 <= P <= M.QβINTEGER. The number of columns inX11andX21.0 <= Q <= MandM-Q <= min(P,M-P,Q).X11βREALarray, dimension(LDX11,Q). On entry, the top block of the matrixXto be reduced. On exit, the columns oftril(X11)specify reflectors forP1and the rows oftriu(X11,1)specify reflectors forQ1. π¦LDX11βINTEGER. The leading dimension ofX11.LDX11 >= P.X21βREALarray, dimension(LDX21,Q). On entry, the bottom block of the matrixXto be reduced. On exit, the columns oftril(X21)specify reflectors forP2. π¦LDX21βINTEGER. The leading dimension ofX21.LDX21 >= M-P.THETAβREALarray, dimension(Q). The entries of the bidiagonal blocksB11,B21are defined byTHETAandPHI. See Further Details.PHIβREALarray, dimension(Q-1). The entries of the bidiagonal blocksB11,B21are defined byTHETAandPHI. See Further Details.TAUP1βREALarray, dimension(M-Q). The scalar factors of the elementary reflectors that defineP1.TAUP2βREALarray, dimension(M-Q). The scalar factors of the elementary reflectors that defineP2.TAUQ1βREALarray, dimension(Q). The scalar factors of the elementary reflectors that defineQ1.PHANTOMβREALarray, dimension(M). The routine computes anM-by-1column vectorYthat is orthogonal to the columns of[ X11; X21 ].PHANTOM(1:P)andPHANTOM(P+1:M)contain Householder vectors forY(1:P)andY(P+1:M), respectively. π» (yes that's genuinely why it's called phantom, iconic naming tbh)WORKβREALarray, dimension(LWORK).LWORKβINTEGER. The dimension of the arrayWORK.LWORK >= M-Q.
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β ifINFO = -i, the i-th argument had an illegal value π
πΈ Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
β¨ Further Details:
- The upper-bidiagonal blocks
B11,B21are represented implicitly by anglesTHETA(1), ...,THETA(Q)andPHI(1), ...,PHI(Q-1). Every entry in each bidiagonal band is a product of a sine or cosine of aTHETAwith a sine or cosine of aPHI. See [1] orSORCSDfor details. π¦ P1,P2, andQ1are represented as products of elementary reflectors. SeeSORCSD2BY1for details on generatingP1,P2, andQ1usingSORGQRandSORGLQ. β¨
π References:
[1] Brian D. Sutton. Computing the complete CS decomposition. Numer. Algorithms, 50(1):33-65, 2009.
Definition at line 211 of file sorbdb4.f.
π subroutine zunbdb4 (integer m, integer p, integer q, complex*16, dimension(ldx11,) x11, integer ldx11, complex16, dimension(ldx21,) x21, integer ldx21, double precision, dimension() theta, double precision, dimension() phi, complex16, dimension() taup1, complex16, dimension() taup2, complex16, dimension() tauq1, complex16, dimension() phantom, complex16, dimension(*) work, integer lwork, integer info)
subroutine zunbdb4 (integer m, integer p, integer q, complex*16,
dimension(ldx11,*) x11, integer ldx11, complex*16, dimension(ldx21,*)
x21, integer ldx21, double precision, dimension(*) theta, double
precision, dimension(*) phi, complex*16, dimension(*) taup1, complex*16,
dimension(*) taup2, complex*16, dimension(*) tauq1, complex*16,
dimension(*) phantom, complex*16, dimension(*) work, integer lwork,
integer info)
ZUNBDB4 β the complex*16, double-precision-angles glow-up of the family. Same decomposition, but make it unitary and make it shimmer. πβ¨
π Purpose:
ZUNBDB4 simultaneously bidiagonalizes the blocks of a tall and skinny matrix X with orthonormal columns:
[ B11 ]
[ X11 ] [ P1 | ] [ 0 ]
[-----] = [---------] [-----] Q1**T .
[ X21 ] [ | P2 ] [ B21 ]
[ 0 ]
X11 is P-by-Q, and X21 is (M-P)-by-Q. M-Q must be no larger than P, M-P, or Q. Routines ZUNBDB1, ZUNBDB2, and ZUNBDB3 handle cases in which M-Q is not the minimum dimension. π«Ά
The unitary matrices P1, P2, and Q1 are P-by-P, (M-P)-by-(M-P), and (M-Q)-by-(M-Q), respectively. They are represented implicitly by Householder vectors. π
B11 and B12 are (M-Q)-by-(M-Q) bidiagonal matrices represented implicitly by angles THETA, PHI. β
π Parameters
MβINTEGER. The number of rowsX11plus the number of rows inX21.PβINTEGER. The number of rows inX11.0 <= P <= M.QβINTEGER. The number of columns inX11andX21.0 <= Q <= MandM-Q <= min(P,M-P,Q).X11βCOMPLEX*16array, dimension(LDX11,Q). On entry, the top block of the matrixXto be reduced. On exit, the columns oftril(X11)specify reflectors forP1and the rows oftriu(X11,1)specify reflectors forQ1. π¦LDX11βINTEGER. The leading dimension ofX11.LDX11 >= P.X21βCOMPLEX*16array, dimension(LDX21,Q). On entry, the bottom block of the matrixXto be reduced. On exit, the columns oftril(X21)specify reflectors forP2. π¦LDX21βINTEGER. The leading dimension ofX21.LDX21 >= M-P.THETAβDOUBLE PRECISIONarray, dimension(Q). The entries of the bidiagonal blocksB11,B21are defined byTHETAandPHI. See Further Details.PHIβDOUBLE PRECISIONarray, dimension(Q-1). The entries of the bidiagonal blocksB11,B21are defined byTHETAandPHI. See Further Details.TAUP1βCOMPLEX*16array, dimension(M-Q). The scalar factors of the elementary reflectors that defineP1.TAUP2βCOMPLEX*16array, dimension(M-Q). The scalar factors of the elementary reflectors that defineP2.TAUQ1βCOMPLEX*16array, dimension(Q). The scalar factors of the elementary reflectors that defineQ1.PHANTOMβCOMPLEX*16array, dimension(M). The routine computes anM-by-1column vectorYthat is orthogonal to the columns of[ X11; X21 ].PHANTOM(1:P)andPHANTOM(P+1:M)contain Householder vectors forY(1:P)andY(P+1:M), respectively. π»WORKβCOMPLEX*16array, dimension(LWORK).LWORKLWORKβ okay so,LWORK is INTEGER, and itβs the dimension of the arrayWORK. The rule isLWORK >= M-Q.
If LWORK = -1, then a workspace query is assumed, bestie: 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. No cap.
INFOβINFO is INTEGER, and hereβs the vibe check:= 0: successful exit. slay.< 0: ifINFO = -i, the i-th argument had an illegal value. not slay, but useful.
Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Further Details π
The upper-bidiagonal blocks B11, B21 are represented implicitly by angles THETA(1), ..., THETA(Q) and PHI(1), ..., PHI(Q-1). Every entry in each bidiagonal band is a product of a sine or cosine of a THETA with a sine or cosine of a PHI. See [1] or ZUNCSD for details.
P1, P2, and Q1 are represented as products of elementary reflectors. See ZUNCSD2BY1 for details on generating P1, P2, and Q1 using ZUNGQR and ZUNGLQ.
References π
[1] Brian D. Sutton. Computing the complete CS decomposition. Numer. Algorithms, 50(1):33-65, 2009.
Definition at line 210 of file zunbdb4.f.
Author π«Ά (autogenerated)
Generated automatically by Doxygen for LAPACK from the source code.
Mwah π β signing off from LAPACK, version 3.12.0, on the unbdb4(3) page. The footer doesnβt list a date, so donβt come for me bestie β thatβs the whole source/version situation. π
π¦ 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