bbcsd(3)
๐
bbcsd(3) โ Library Functions Manual
okay so bestie, this is bbcsd(3) and it's lowkey iconic in a "I live inside a numerical linear algebra library" way. We're doing the whole page, all the flags, all the arrays, all the INFO drama. No skipping, no cap. ๐ซถ
๐ NAME
bbcsd โ bbcsd: ??
(Yes, the original is literally bbcsd: ??. Not a typo on my end, bestie. ๐ญ)
โจ SYNOPSIS โจ
๐ง Functions
CBBCSD
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)
DBBCSD
subroutine dbbcsd (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, work, lwork, info)
SBBCSD
subroutine sbbcsd (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, work, lwork, info)
ZBBCSD
subroutine zbbcsd (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)
๐ฌ Detailed Description
Original page leaves this section empty, bestie. We're not inventing lore. ๐ซถ
๐ Function Documentation
๐ธ subroutine cbbcsd
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
CBBCSD computes the CS decomposition of a unitary matrix in bidiagonal-block form. It's giving "niche matrix decomposition main character energy," and honestly? Obsessed. ๐
[ B11 | B12 0 0 ]
[ 0 | 0 -I 0 ]
X = [----------------]
[ B21 | B22 0 0 ]
[ 0 | 0 0 I ]
[ 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).
If LRWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the RWORK array, returns this value as the first entry of the work array, and no error message related to LRWORK is issued by XERBLA.
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.
๐
dbbcsd โ the double-precision one ๐
subroutine dbbcsd (character jobu1, character jobu2, character jobv1t,
character jobv2t, character trans, integer m, integer p, integer q,
double precision, dimension( * ) theta, double precision, dimension( * )
phi, double precision, dimension( ldu1, * ) u1, integer ldu1, double
precision, dimension( ldu2, * ) u2, integer ldu2, double precision,
dimension( ldv1t, * ) v1t, integer ldv1t, double precision, dimension(
ldv2t, * ) v2t, integer ldv2t, double precision, dimension( * ) b11d,
double precision, dimension( * ) b11e, double precision, dimension( * )
b12d, double precision, dimension( * ) b12e, double precision,
dimension( * ) b21d, double precision, dimension( * ) b21e, double
precision, dimension( * ) b22d, double precision, dimension( * ) b22e,
double precision, dimension( * ) work, integer lwork, integer info)
DBBCSD
โจ Purpose โจ
okay so bestie, DBBCSD computes the CS decomposition of an orthogonal matrix in bidiagonal-block form, and the whole vibe is linear algebra main character energy. Hereโs the picture, no cap:
[ B11 | B12 0 0 ]
[ 0 | 0 -I 0 ]
X = [----------------]
[ B21 | B22 0 0 ]
[ 0 | 0 0 I ]
[ C | -S 0 0 ]
[ U1 | ] [ 0 | 0 -I 0 ] [ V1 | ]**T
= [---------] [---------------] [---------] .
[ | 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 DORCSD for details.)
The bidiagonal matrices B11, B12, B21, and B22 are represented implicitly by angles THETA(1:Q) and PHI(1:Q-1).
The orthogonal matrices U1, U2, V1T, and V2T are input/output. The input matrices are pre- or post-multiplied by the appropriate singular vector matrices. obsessed, honestly.
๐ธ Parameters ๐ธ
okay bestie, hereโs the full roster โ every single parameter, no skips, periodt.
JOBU1โJOBU1is CHARACTER.= 'Y': U1 is updated; otherwise: U1 is not updated.JOBU2โJOBU2is CHARACTER.= 'Y': U2 is updated; otherwise: U2 is not updated.JOBV1TโJOBV1Tis CHARACTER.= 'Y': V1T is updated; otherwise: V1T is not updated.JOBV2TโJOBV2Tis CHARACTER.= 'Y': V2T is updated; otherwise: V2T is not updated.TRANSโTRANSis CHARACTER.= 'T': X, U1, U2, V1T, and V2T are stored in row-major order; otherwise: X, U1, U2, V1T, and V2T are stored in column-major order.MโMis INTEGER. The number of rows and columns in X, the orthogonal matrix in bidiagonal-block form.PโPis INTEGER. The number of rows in the top-left block of X.0 <= P <= M.QโQis INTEGER. The number of columns in the top-left block of X.0 <= Q <= MIN(P,M-P,M-Q).THETAโTHETAis DOUBLE PRECISION array, dimension(Q). On entry, the angles THETA(1),...,THETA(Q) that, along with PHI(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โPHIis DOUBLE PRECISION array, dimension(Q-1). The angles PHI(1),...,PHI(Q-1) that, along with THETA(1),..., THETA(Q), define the matrix in bidiagonal-block form.U1โU1is DOUBLE PRECISION array, dimension(LDU1,P). On entry, a P-by-P matrix. On exit, U1 is postmultiplied by the left singular vector matrix common to[ B11 ; 0 ]and[ B12 0 0 ; 0 -I 0 0 ].LDU1โLDU1is INTEGER. The leading dimension of the array U1,LDU1 >= MAX(1,P).U2โU2is DOUBLE PRECISION array, dimension(LDU2,M-P). On entry, an (M-P)-by-(M-P) matrix. On exit, U2 is postmultiplied by the left singular vector matrix common to[ B21 ; 0 ]and[ B22 0 0 ; 0 0 I ].LDU2โLDU2is INTEGER. The leading dimension of the array U2,LDU2 >= MAX(1,M-P).V1TโV1Tis DOUBLE PRECISION array, dimension(LDV1T,Q). On entry, a Q-by-Q matrix. On exit, V1T is premultiplied by the transpose of the right singular vector matrix common to[ B11 ; 0 ]and[ B21 ; 0 ].LDV1TโLDV1Tis INTEGER. The leading dimension of the array V1T,LDV1T >= MAX(1,Q).V2TโV2Tis DOUBLE PRECISION array, dimension(LDV2T,M-Q). On entry, an (M-Q)-by-(M-Q) matrix. On exit, V2T is premultiplied by the transpose of the right singular vector matrix common to[ B12 0 0 ; 0 -I 0 ]and[ B22 0 0 ; 0 0 I ].LDV2TโLDV2Tis INTEGER. The leading dimension of the array V2T,LDV2T >= MAX(1,M-Q).B11DโB11Dis DOUBLE PRECISION array, dimension(Q). When DBBCSD converges, B11D contains the cosines of THETA(1), ..., THETA(Q). If DBBCSD fails to converge, then B11D contains the diagonal of the partially reduced top-left block.B11EโB11Eis DOUBLE PRECISION array, dimension(Q-1). When DBBCSD converges, B11E contains zeros. If DBBCSD fails to converge, then B11E contains the superdiagonal of the partially reduced top-left block.B12DโB12Dis DOUBLE PRECISION array, dimension(Q). When DBBCSD converges, B12D contains the negative sines of THETA(1), ..., THETA(Q). If DBBCSD fails to converge, then B12D contains the diagonal of the partially reduced top-right block.B12EโB12Eis DOUBLE PRECISION array, dimension(Q-1). When DBBCSD converges, B12E contains zeros. If DBBCSD fails to converge, then B12E contains the subdiagonal of the partially reduced top-right block.B21DโB21Dis DOUBLE PRECISION array, dimension(Q). When DBBCSD converges, B21D contains the negative sines of THETA(1), ..., THETA(Q). If DBBCSD fails to converge, then B21D contains the diagonal of the partially reduced bottom-left block.B21EโB21Eis DOUBLE PRECISION array, dimension(Q-1). When DBBCSD converges, B21E contains zeros. If DBBCSD fails to converge, then B21E contains the subdiagonal of the partially reduced bottom-left block.B22DโB22Dis DOUBLE PRECISION array, dimension(Q). When DBBCSD converges, B22D contains the negative sines of THETA(1), ..., THETA(Q). If DBBCSD fails to converge, then B22D contains the diagonal of the partially reduced bottom-right block.B22EโB22Eis DOUBLE PRECISION array, dimension(Q-1). When DBBCSD converges, B22E contains zeros. If DBBCSD fails to converge, then B22E contains the subdiagonal of the partially reduced bottom-right block.WORKโWORKis DOUBLE PRECISION array, dimension(MAX(1,LWORK)). On exit, if INFO = 0, WORK(1) returns the optimal LWORK.LWORKโLWORKis INTEGER. The dimension of the array WORK.LWORK >= MAX(1,8*Q). IfLWORK = -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โINFOis INTEGER.= 0: successful exit.< 0: ifINFO = -i, the i-th argument had an illegal value.> 0: if DBBCSD did not converge, INFO specifies the number of nonzero entries in PHI, and B11D, B11E, etc., contain the partially reduced matrix.
๐ฎ Internal Parameters ๐ฎ
TOLMULโTOLMULDOUBLE PRECISION, default =MAX(10,MIN(100,EPS**(-1/8))). TOLMUL controls the convergence criterion of the QR loop. Angles THETA(i), PHI(i) are rounded to 0 or PI/2 when they are within TOLMUL*EPS of 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 dbbcsd.f.
๐ sbbcsd โ the REAL sibling ๐
subroutine sbbcsd (character jobu1, character jobu2, character jobv1t,
character jobv2t, character trans, integer m, integer p, integer q,
real, dimension( * ) theta, real, dimension( * ) phi, real, dimension(
ldu1, * ) u1, integer ldu1, real, dimension( ldu2, * ) u2, integer ldu2,
real, dimension( ldv1t, * ) v1t, integer ldv1t, real, 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( * ) work, integer
lwork, integer info)
SBBCSD
โจ Purpose โจ
okay so back to SBBCSD, bestie โ it computes the CS decomposition of an orthogonal matrix in bidiagonal-block form, and the whole setup is literally this:
[ B11 | B12 0 0 ]
[ 0 | 0 -I 0 ]
X = [----------------]
[ B21 | B22 0 0 ]
[ 0 | 0 0 I ]
and it factors like this, no cap:
[ C | -S 0 0 ]
[ U1 | ] [ 0 | 0 -I 0 ] [ V1 | ]**T
= [---------] [---------------] [---------] .
[ | 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 SORCSD for details.)
The bidiagonal matrices B11, B12, B21, and B22 are represented implicitly by angles THETA(1:Q) and PHI(1:Q-1). ๐
The orthogonal matrices U1, U2, V1T, and V2T are input/output. The input matrices are pre- or post-multiplied by the appropriate singular vector matrices. iconic behavior, honestly ๐
๐ Parameters
JOBU1โCHARACTER.= 'Y':U1is updated; otherwise:U1is not updated.JOBU2โCHARACTER.= 'Y':U2is updated; otherwise:U2is not updated.JOBV1TโCHARACTER.= 'Y':V1Tis updated; otherwise:V1Tis not updated.JOBV2TโCHARACTER.= 'Y':V2Tis updated; otherwise:V2Tis not updated.TRANSโCHARACTER.= 'T':X,U1,U2,V1T, andV2Tare stored in row-major order; otherwise:X,U1,U2,V1T, andV2Tare stored in column-major order.MโINTEGER. The number of rows and columns inX, the orthogonal matrix in bidiagonal-block form.PโINTEGER. The number of rows in the top-left block ofX.0 <= P <= M.QโINTEGER. The number of columns in the top-left block ofX.0 <= Q <= MIN(P,M-P,M-Q).THETAโREAL array, 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โREAL array, dimension(Q-1). The anglesPHI(1),...,PHI(Q-1)that, along withTHETA(1),..., THETA(Q), define the matrix in bidiagonal-block form.U1โREAL array, 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โINTEGER. The leading dimension of the arrayU1,LDU1 >= MAX(1,P).U2โREAL array, 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โINTEGER. The leading dimension of the arrayU2,LDU2 >= MAX(1,M-P).V1TโREAL array, dimension(LDV1T,Q). On entry, aQ-by-Qmatrix. On exit,V1Tis premultiplied by the transpose of the right singular vector matrix common to[ B11 ; 0 ]and[ B21 ; 0 ].LDV1TโINTEGER. The leading dimension of the arrayV1T,LDV1T >= MAX(1,Q).V2TโREAL array, dimension(LDV2T,M-Q). On entry, an(M-Q)-by-(M-Q)matrix. On exit,V2Tis premultiplied by the transpose of the right singular vector matrix common to[ B12 0 0 ; 0 -I 0 0 ]and[ B22 0 0 ; 0 0 I ].LDV2TโINTEGER. The leading dimension of the arrayV2T,LDV2T >= MAX(1,M-Q).B11DโREAL array, dimension(Q). WhenSBBCSDconverges,B11Dcontains the cosines ofTHETA(1), ..., THETA(Q). IfSBBCSDfails to converge, thenB11Dcontains the diagonal of the partially reduced top-left block.B11EโREAL array, dimension(Q-1). WhenSBBCSDconverges,B11Econtains zeros. IfSBBCSDfails to converge, thenB11Econtains the superdiagonal of the partially reduced top-left block.B12DโREAL array, dimension(Q). WhenSBBCSDconverges,B12Dcontains the negative sines ofTHETA(1), ..., THETA(Q). IfSBBCSDfails to converge, thenB12Dcontains the diagonal of the partially reduced top-right block.B12EโREAL array, dimension(Q-1). WhenSBBCSDconverges,B12Econtains zeros. IfSBBCSDfails to converge, thenB12Econtains the subdiagonal of the partially reduced top-right block.B21DโREAL array, dimension(Q). WhenSBBCSDconverges,B21Dcontains the negative sines ofTHETA(1), ..., THETA(Q). IfSBBCSDfails to converge, thenB21Dcontains the diagonal of the partially reduced bottom-left block.B21EโREAL array, dimension(Q-1). WhenSBBCSDconverges,B21Econtains zeros. IfSBBCSDfails to converge, thenB21Econtains the subdiagonal of the partially reduced bottom-left block.B22DโREAL array, dimension(Q). WhenSBBCSDconverges,B22Dcontains the negative sines ofTHETA(1), ..., THETA(Q). IfSBBCSDfails to converge, thenB22Dcontains the diagonal of the partially reduced bottom-right block.B22EโREAL array, dimension(Q-1). WhenSBBCSDconverges,B22Econtains zeros. IfSBBCSDfails to converge, thenB22Econtains the subdiagonal of the partially reduced bottom-right block.WORKโREAL array, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKโINTEGER. The dimension of the arrayWORK.LWORK >= MAX(1,8*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. workspace-query queen behavior โจ
INFOโINTEGER.= 0: successful exit.< 0: ifINFO = -i, thei-th argument had an illegal value.> 0: ifSBBCSDdid 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 sbbcsd.f.
and here's the ZBBCSD signature, bestie โ complex*16 edition, same energy ๐:
subroutine zbbcsd (character jobu1, character jobu2, character jobv1t,
character jobv2t, character trans, integer m, integer p, integer q,
double precision, dimension( * ) theta, double precision, dimension( * )
phi, complex*16, dimension( ldu1, * ) u1, integer ldu1, complex*16,
dimension( ldu2, * ) u2, integer ldu2, complex*16, dimension( ldv1t, * )
v1t, integer ldv1t, complex*16, dimension( ldv2t, * ) v2t, integer
ldv2t, double precision, dimension( * ) b11d, double precision,
dimension( * ) b11e, double precision, dimension( * ) b12d, double
precision, dimension( * ) b12e, double precision, dimension( * ) b21d,
double precision, dimension( * ) b21e, double precision, dimension( * )
b22d, double precision, dimension( * ) b22e, double precision,
dimension( * ) rwork, integer lrwork, integer info)
ZBBCSD
Purpose:
ZBBCSD computes the CS decomposition of a unitary matrix in bidiagonal-block form, and the whole mood is this ๐
:
[ B11 | B12 0 0 ]
[ 0 | 0 -I 0 ]
X = [----------------]
[ B21 | B22 0 0 ]
[ 0 | 0 0 I ]
[ 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 ZUNCSD 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โTHETAisDOUBLE PRECISIONarray, 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โPHIisDOUBLE PRECISIONarray, dimension(Q-1). The anglesPHI(1),...,PHI(Q-1)that, along withTHETA(1),...,THETA(Q), define the matrix in bidiagonal-block form. ๐U1โU1isCOMPLEX*16array, 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โU2isCOMPLEX*16array, 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โV1TisCOMPLEX*16array, 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โV2TisCOMPLEX*16array, 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โB11DisDOUBLE PRECISIONarray, dimension(Q). WhenZBBCSDconverges,B11Dcontains the cosines ofTHETA(1), ..., THETA(Q). IfZBBCSDfails to converge, thenB11Dcontains the diagonal of the partially reduced top-left block. ๐ธB11EโB11EisDOUBLE PRECISIONarray, dimension(Q-1). WhenZBBCSDconverges,B11Econtains zeros. IfZBBCSDfails to converge, thenB11Econtains the superdiagonal of the partially reduced top-left block. ๐B12DโB12DisDOUBLE PRECISIONarray, dimension(Q). WhenZBBCSDconverges,B12Dcontains the negative sines ofTHETA(1), ..., THETA(Q). IfZBBCSDfails to converge, thenB12Dcontains the diagonal of the partially reduced top-right block. ๐ฅB12EโB12EisDOUBLE PRECISIONarray, dimension(Q-1). WhenZBBCSDconverges,B12Econtains zeros. IfZBBCSDfails to converge, thenB12Econtains the subdiagonal of the partially reduced top-right block. โจB21DโB21DisDOUBLE PRECISIONarray, dimension(Q). WhenZBBCSDconverges,B21Dcontains the negative sines ofTHETA(1), ..., THETA(Q). IfZBBCSDfails to converge, thenB21Dcontains the diagonal of the partially reduced bottom-left block. ๐ซถB21EโB21EisDOUBLE PRECISIONarray, dimension(Q-1). WhenZBBCSDconverges,B21Econtains zeros. IfZBBCSDfails to converge, thenB21Econtains the subdiagonal of the partially reduced bottom-left block. ๐B22DโB22DisDOUBLE PRECISIONarray, dimension(Q). WhenZBBCSDconverges,B22Dcontains the negative sines ofTHETA(1), ..., THETA(Q). IfZBBCSDfails to converge, thenB22Dcontains the diagonal of the partially reduced bottom-right block. ๐ฆB22EโB22EisDOUBLE PRECISIONarray, dimension(Q-1). WhenZBBCSDconverges,B22Econtains zeros. IfZBBCSDfails to converge, thenB22Econtains the subdiagonal of the partially reduced bottom-right block. ๐RWORKโRWORKisDOUBLE PRECISIONarray, 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: ifZBBCSDdid not converge,INFOspecifies the number of nonzero entries inPHI, andB11D,B11E, etc., contain the partially reduced matrix. ๐
๐ Internal Parameters ๐
TOLMULโDOUBLE PRECISION, 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 zbbcsd.f. ๐
Generated automatically by Doxygen for LAPACK from the source code. ๐ค
Footer tea โ: LAPACK Version 3.12.0, page bbcsd(3) โ the footer didn't list a date, so that's the whole story bestie ๐
โจ
๐ฆ 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