CBBCSD(3)
π CBBCSD(3) π
okay so this is from the Library Functions Manual (manual name folded in right here, bestie π). The page is headed CBBCSD(3), and we're about to get into a Fortran subroutine that does CS decomposition. Buckle up, it's giving linear algebra main character energy. π¦
π NAME π
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/cbbcsd.f
that's it. that's the NAME section. iconic minimalism, no cap. π
πΈ SYNOPSIS πΈ
Functions/Subroutines
here's the callable baddie in all its Fortran glory, exactly as written:
subroutine CBBCSD (jobu1, jobu2, jobv1t, jobv2t, trans, m, p, q, theta,
phi, u1, ldu1, u2, ldu2, v1t, ldv1t, v2t, ldv2t, b11d, b11e, b12d,
b12e, b21d, b21e, b22d, b22e, rwork, lrwork, info)
CBBCSD
π¦ Function/Subroutine Documentation π¦
the full typed-out signature, because we're not skipping the boring-looking bits:
subroutine CBBCSD (character jobu1, character jobu2, character jobv1t,
character jobv2t, character trans, integer m, integer p, integer q,
real, dimension( * ) theta, real, dimension( * ) phi, complex,
dimension( ldu1, * ) u1, integer ldu1, complex, dimension( ldu2, * ) u2,
integer ldu2, complex, dimension( ldv1t, * ) v1t, integer ldv1t,
complex, dimension( ldv2t, * ) v2t, integer ldv2t, real, dimension( * )
b11d, real, dimension( * ) b11e, real, dimension( * ) b12d, real,
dimension( * ) b12e, real, dimension( * ) b21d, real, dimension( * )
b21e, real, dimension( * ) b22d, real, dimension( * ) b22e, real,
dimension( * ) rwork, integer lrwork, integer info)
CBBCSD
β¨ Purpose β¨
bestie, CBBCSD computes the CS decomposition of a unitary matrix in bidiagonal-block form. The matrix X is set up like this:
[ B11 | B12 0 0 ]
[ 0 | 0 -I 0 ]
X = [----------------]
[ B21 | B22 0 0 ]
[ 0 | 0 0 I ]
and the decomposition is this whole mood:
[ C | -S 0 0 ]
[ U1 | ] [ 0 | 0 -I 0 ] [ V1 | ]**H
= [---------] [---------------] [---------] .
[ | U2 ] [ S | C 0 0 ] [ | V2 ]
[ 0 | 0 0 I ]
X is M-by-M, its top-left block is P-by-Q, and Q must be no larger than P, M-P, or M-Q. (If Q is not the smallest index, then X must be transposed and/or permuted. This can be done in constant time using the TRANS and SIGNS options. See CUNCSD for details.)
The bidiagonal matrices B11, B12, B21, and B22 are represented implicitly by angles THETA(1:Q) and PHI(1:Q-1).
The unitary matrices U1, U2, V1T, and V2T are input/output. The input matrices are pre- or post-multiplied by the appropriate singular vector matrices.
π Parameters π
JOBU1βJOBU1isCHARACTER.= 'Y':U1is updated; otherwise:U1is not updated.JOBU2βJOBU2isCHARACTER.= 'Y':U2is updated; otherwise:U2is not updated.JOBV1TβJOBV1TisCHARACTER.= 'Y':V1Tis updated; otherwise:V1Tis not updated.JOBV2TβJOBV2TisCHARACTER.= 'Y':V2Tis updated; otherwise:V2Tis not updated.TRANSβTRANSisCHARACTER.= 'T':X,U1,U2,V1T, andV2Tare stored in row-major order; otherwise:X,U1,U2,V1T, andV2Tare stored in column-major order.MβMisINTEGER. The number of rows and columns inX, the unitary matrix in bidiagonal-block form.PβPisINTEGER. The number of rows in the top-left block ofX.0 <= P <= M.QβQisINTEGER. The number of columns in the top-left block ofX.0 <= Q <= MIN(P,M-P,M-Q).THETAβTHETAisREALarray, dimension(Q). On entry, the anglesTHETA(1),...,THETA(Q)that, along withPHI(1), ...,PHI(Q-1), define the matrix in bidiagonal-block form. On exit, the angles whose cosines and sines define the diagonal blocks in the CS decomposition.PHIβPHIisREALarray, dimension(Q-1). The anglesPHI(1),...,PHI(Q-1)that, along withTHETA(1),...,THETA(Q), define the matrix in bidiagonal-block form.U1βU1isCOMPLEXarray, dimension(LDU1,P). On entry, aP-by-Pmatrix. On exit,U1is postmultiplied by the left singular vector matrix common to[ B11 ; 0 ]and[ B12 0 0 ; 0 -I 0 0 ].LDU1βLDU1isINTEGER. The leading dimension of the arrayU1,LDU1 >= MAX(1,P).U2βU2isCOMPLEXarray, dimension(LDU2,M-P). On entry, an(M-P)-by-(M-P)matrix. On exit,U2is postmultiplied by the left singular vector matrix common to[ B21 ; 0 ]and[ B22 0 0 ; 0 0 I ].LDU2βLDU2isINTEGER. The leading dimension of the arrayU2,LDU2 >= MAX(1,M-P).V1TβV1TisCOMPLEXarray, dimension(LDV1T,Q). On entry, aQ-by-Qmatrix. On exit,V1Tis premultiplied by the conjugate transpose of the right singular vector matrix common to[ B11 ; 0 ]and[ B21 ; 0 ].LDV1TβLDV1TisINTEGER. The leading dimension of the arrayV1T,LDV1T >= MAX(1,Q).V2TβV2TisCOMPLEXarray, dimension(LDV2T,M-Q). On entry, an(M-Q)-by-(M-Q)matrix. On exit,V2Tis premultiplied by the conjugate transpose of the right singular vector matrix common to[ B12 0 0 ; 0 -I 0 ]and[ B22 0 0 ; 0 0 I ].LDV2TβLDV2TisINTEGER. The leading dimension of the arrayV2T,LDV2T >= MAX(1,M-Q).B11DβB11DisREALarray, dimension(Q). WhenCBBCSDconverges,B11Dcontains the cosines ofTHETA(1), ..., THETA(Q). IfCBBCSDfails to converge, thenB11Dcontains the diagonal of the partially reduced top-left block.B11EβB11EisREALarray, dimension(Q-1). WhenCBBCSDconverges,B11Econtains zeros. IfCBBCSDfails to converge, thenB11Econtains the superdiagonal of the partially reduced top-left block.B12DβB12DisREALarray, dimension(Q). WhenCBBCSDconverges,B12Dcontains the negative sines ofTHETA(1), ..., THETA(Q). IfCBBCSDfails to converge, thenB12Dcontains the diagonal of the partially reduced top-right block.B12EβB12EisREALarray, dimension(Q-1). WhenCBBCSDconverges,B12Econtains zeros. IfCBBCSDfails to converge, thenB12Econtains the subdiagonal of the partially reduced top-right block.B21DβB21DisREALarray, dimension(Q). WhenCBBCSDconverges,B21Dcontains the negative sines ofTHETA(1), ..., THETA(Q). IfCBBCSDfails to converge, thenB21Dcontains the diagonal of the partially reduced bottom-left block.B21EβB21EisREALarray, dimension(Q-1). WhenCBBCSDconverges,B21Econtains zeros. IfCBBCSDfails to converge, thenB21Econtains the subdiagonal of the partially reduced bottom-left block.B22DβB22DisREALarray, dimension(Q). WhenCBBCSDconverges,B22Dcontains the negative sines ofTHETA(1), ..., THETA(Q). IfCBBCSDfails to converge, thenB22Dcontains the diagonal of the partially reduced bottom-right block.B22EβB22EisREALarray, dimension(Q-1). WhenCBBCSDconverges,B22Econtains zeros. IfCBBCSDfails to converge, thenB22Econtains the subdiagonal of the partially reduced bottom-right block.RWORKβRWORKisREALarray, dimension(MAX(1,LRWORK)). On exit, ifINFO = 0,RWORK(1)returns the optimalLRWORK.LRWORKβLRWORKisINTEGER. The dimension of the arrayRWORK.LRWORK >= MAX(1,8*Q). IfLRWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of theRWORKarray, returns this value as the first entry of the work array, and no error message related toLRWORKis issued byXERBLA.INFOβINFOisINTEGER.= 0: successful exit.< 0: ifINFO = -i, thei-th argument had an illegal value.> 0: ifCBBCSDdid not converge,INFOspecifies the number of nonzero entries inPHI, andB11D,B11E, etc., contain the partially reduced matrix.
π Internal Parameters π
TOLMULβREAL, default =MAX(10,MIN(100,EPS**(-1/8))).TOLMULcontrols the convergence criterion of the QR loop. AnglesTHETA(i),PHI(i)are rounded to0orPI/2when they are withinTOLMUL*EPSof either bound.
π References π
- [1] Brian D. Sutton. Computing the complete CS decomposition. Numer. Algorithms, 50(1):33-65, 2009.
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 328 of file cbbcsd.f.
π« Author π«
Generated automatically by Doxygen for LAPACK from the source code.
okay that's the whole page, bestie. the footer energy is LAPACK, Version 3.12.0, and the source path is /home/abui...RC/cbbcsd.f(3). no date was listed in that footer, so I'm not gonna invent one β slay responsibly. π
β¨π
π¦ 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