SRC/dbbcsd.f(3)
π
SRC/dbbcsd.f(3) π
Manual name: Library Functions Manual β folded in right here, bestie, because weβre not copying the header line like a boring NPC. β¨
β¨ NAME β¨
SRC/dbbcsd.f β the DBBCSD routineβs page. π
β¨ SYNOPSIS β¨
π¦ Functions/Subroutines
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)
DBBCSD
π¦ Function/Subroutine Documentation π¦
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 DBBCSD computes the CS decomposition of an orthogonal matrix in bidiagonal-block form. Itβs giving very structured, very main-character linear algebra. π
Hereβs the exact bidiagonal-block glow-up:
[ 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. Periodt. 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. β¨
π Parameters π
JOBU1βJOBU1 is CHARACTER.= 'Y':U1is updated; otherwise:U1is not updated.JOBU2βJOBU2 is CHARACTER.= 'Y':U2is updated; otherwise:U2is not updated.JOBV1TβJOBV1T is CHARACTER.= 'Y':V1Tis updated; otherwise:V1Tis not updated.JOBV2TβJOBV2T is CHARACTER.= 'Y':V2Tis updated; otherwise:V2Tis not updated.TRANSβTRANS is CHARACTER.= 'T':X,U1,U2,V1T, andV2Tare stored in row-major order; otherwise:X,U1,U2,V1T, andV2Tare stored in column-major order.MβM is INTEGER. The number of rows and columns inX, the orthogonal matrix in bidiagonal-block form.PβP is INTEGER. The number of rows in the top-left block ofX.0 <= P <= M.QβQ is INTEGER. The number of columns in the top-left block ofX.0 <= Q <= MIN(P,M-P,M-Q).THETAβTHETA is DOUBLE PRECISION 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βPHI is DOUBLE PRECISION array, dimension (Q-1). The anglesPHI(1),...,PHI(Q-1)that, along withTHETA(1),...,THETA(Q), define the matrix in bidiagonal-block form.U1βU1 is DOUBLE PRECISION 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βLDU1 is INTEGER. The leading dimension of the arrayU1,LDU1 >= MAX(1,P).U2βU2 is DOUBLE PRECISION 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βLDU2 is INTEGER. The leading dimension of the arrayU2,LDU2 >= MAX(1,M-P).V1TβV1T is DOUBLE PRECISION 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βLDV1T is INTEGER. The leading dimension of the arrayV1T,LDV1T >= MAX(1,Q).V2TβV2T is DOUBLE PRECISION 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 ]and[ B22 0 0 ; 0 0 I ].LDV2TβLDV2T is INTEGER. The leading dimension of the arrayV2T,LDV2T >= MAX(1,M-Q).B11DβB11D is DOUBLE PRECISION array, dimension (Q). WhenDBBCSDconverges,B11Dcontains the cosines ofTHETA(1), ..., THETA(Q). IfDBBCSDfails to converge, thenB11Dcontains the diagonal of the partially reduced top-left block.B11EβB11E is DOUBLE PRECISION array, dimension (Q-1). WhenDBBCSDconverges,B11Econtains zeros. IfDBBCSDfails to converge, thenB11Econtains the superdiagonal of the partially reduced top-left block.B12DβB12D is DOUBLE PRECISION array, dimension (Q). WhenDBBCSDconverges,B12Dcontains the negative sines ofTHETA(1), ..., THETA(Q). IfDBBCSDfails to converge, thenB12Dcontains the diagonal of the partially reduced top-right block.B12EβB12E is DOUBLE PRECISION array, dimension (Q-1). WhenDBBCSDconverges,B12Econtains zeros. IfDBBCSDfails to converge, thenB12Econtains the subdiagonal of the partially reduced top-right block.B21DβB21D is DOUBLE PRECISION array, dimension (Q). WhenDBBCSDconverges,B21Dcontains the negative sines ofTHETA(1), ..., THETA(Q). IfDBBCSDfails to converge, thenB21Dcontains the diagonal of the partially reduced bottom-left block.B21EβB21E is DOUBLE PRECISION array, dimension (Q-1). WhenDBBCSDconverges,B21Econtains zeros. IfDBBCSDfails to converge, thenB21Econtains the subdiagonal of the partially reduced bottom-left block.B22DβB22D is DOUBLE PRECISION array, dimension (Q). WhenDBBCSDconverges,B22Dcontains the negative sines ofTHETA(1), ..., THETA(Q). IfDBBCSDfails to converge, thenB22Dcontains the diagonal of the partially reduced bottom-right block.B22EβB22E is DOUBLE PRECISION array, dimension (Q-1). WhenDBBCSDconverges,B22Econtains zeros. IfDBBCSDfails to converge, thenB22Econtains the subdiagonal of the partially reduced bottom-right block.WORKβWORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKβLWORK is 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.
INFOβINFO is INTEGER.= 0: successful exit.< 0: ifINFO = -i, thei-th argument had an illegal value.> 0: ifDBBCSDdid 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 β
Definition at line 328 of file dbbcsd.f.
π Author π
π Footer check, bestie: Generated automatically by Doxygen for LAPACK from the source code β LAPACK Version 3.12.0, source SRC/dbbcsd.f(3); date: not printed on this footer, so weβre not inventing one. π
π¦ 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