DBBCSD(3)

๐Ÿ“ฆ version 3.12.0, in opensuse-leap 16.0

๐Ÿ’… DBBCSD(3) โ€” like, the whole entire manual, bestie

okay so this is from the Library Functions Manual, and the file it lives in is literally /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/dbbcsd.f โ€” that's the name section, that's the vibe, we move. ๐ŸŽ€


โœจ 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)

That's DBBCSD, bestie. Say it with me: 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. yes, again. it's iconic like that. ๐Ÿ‘‘

๐Ÿซถ Purpose ๐Ÿซถ

okay so listen โ€” DBBCSD computes the CS decomposition of an orthogonal matrix in bidiagonal-block form. and the form is giving:

[ B11 | B12 0  0 ]
[  0  |  0 -I  0 ]
X = [----------------]
[ B21 | B22 0  0 ]
[  0  |  0  0  I ]

and then, the glow-up:

                          [  C | -S  0  0 ]
              [ U1 |    ] [  0 |  0 -I  0 ] [ V1 |    ]**T
            = [---------] [---------------] [---------]   .
              [    | U2 ] [  S |  C  0  0 ] [    | V2 ]
                          [  0 |  0  0  I ]

so 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. and like โ€” if Q is not the smallest index, then X must be transposed and/or permuted. that's totally doable in constant time using the TRANS and SIGNS options. see DORCSD for the deets, iykyk. ๐Ÿ’ซ

the bidiagonal matrices B11, B12, B21, and B22 are represented implicitly by angles THETA(1:Q) and PHI(1:Q-1).

and 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. main character matrices, honestly. ๐ŸŒˆ


๐ŸŒŸ Parameters ๐ŸŒŸ

  • JOBU1 โ€” JOBU1 is CHARACTER. = 'Y': U1 is updated; otherwise: U1 is not updated. ๐Ÿ’–
  • JOBU2 โ€” JOBU2 is CHARACTER. = 'Y': U2 is updated; otherwise: U2 is not updated. ๐Ÿ’–
  • JOBV1T โ€” JOBV1T is CHARACTER. = 'Y': V1T is updated; otherwise: V1T is not updated. ๐Ÿ’–
  • JOBV2T โ€” JOBV2T is CHARACTER. = 'Y': V2T is updated; otherwise: V2T is not updated. ๐Ÿ’–
  • TRANS โ€” TRANS is 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 โ€” M is INTEGER. the number of rows and columns in X, the orthogonal matrix in bidiagonal-block form. ๐Ÿ“
  • P โ€” P is INTEGER. the number of rows in the top-left block of X. 0 <= P <= M. ๐Ÿ“
  • Q โ€” Q is INTEGER. the number of columns in the top-left block of X. 0 <= Q <= MIN(P,M-P,M-Q). ๐ŸŽฏ
  • THETA โ€” THETA is 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. angles ate and left no crumbs. ๐Ÿ“
  • PHI โ€” PHI is 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 โ€” U1 is 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 โ€” LDU1 is INTEGER. the leading dimension of the array U1, 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, U2 is 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 array U2, LDU2 >= MAX(1,M-P). โœจ
  • V1T โ€” V1T is 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 โ€” LDV1T is INTEGER. the leading dimension of the array V1T, 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, 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 โ€” LDV2T is INTEGER. the leading dimension of the array V2T, LDV2T >= MAX(1,M-Q). โœจ
  • B11D โ€” B11D is 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. ๐Ÿ˜ญ (we believe in convergence in this house)
  • B11E โ€” B11E is 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 โ€” B12D is 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 โ€” B12E is 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 โ€” B21D is 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 โ€” B21E is 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 โ€” B22D is 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 โ€” B22E is 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 โ€” WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)). on exit, if INFO = 0, WORK(1) returns the optimal LWORK. ๐ŸŒธ
  • LWORK โ€” LWORK is INTEGER. the dimension of the array WORK. LWORK >= MAX(1,8*Q).
and listen: 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. so don't come for XERBLA, it's literally minding its business. ๐Ÿ’…
  • INFO โ€” INFO is INTEGER.
    • = 0: successful exit. slay. ๐ŸŽ‰
    • < 0: if INFO = -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 โ€” DOUBLE 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. lowkey the vibe check of the whole algorithm, ngl. ๐Ÿงš

๐Ÿ“š References ๐Ÿ“š

  1. Brian D. Sutton. Computing the complete CS decomposition. Numer. Algorithms, 50(1):33-65, 2009. (bestie wrote a paper, we stan an academic icon ๐Ÿ‘‘)

๐ŸŒบ Author ๐ŸŒบ

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

Definition at line 328 of file dbbcsd.f. ๐Ÿ“


๐Ÿฆ‹ Author (again, yes) ๐Ÿฆ‹

Generated automatically by Doxygen for LAPACK from the source code. not a human, just vibes and a parser. ๐Ÿค–โœจ


so yeah, that's the whole page, nothing skipped, every flag and array and INFO code accounted for, fr fr. this came to you from LAPACK, Version 3.12.0, living at /home/abui...RC/dbbcsd.f(3) โ€” mwah, bye bestie, go decompose something orthogonally ๐Ÿ’…๐ŸŽ€๐Ÿ’–

๐Ÿ“ฆ where this page comes from