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 โ€” 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 unitary 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 REAL 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 โ€” PHI is REAL 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 COMPLEX 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 COMPLEX 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 COMPLEX array, dimension (LDV1T,Q). On entry, a Q-by-Q matrix. On exit, V1T is premultiplied by the conjugate 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 COMPLEX array, dimension (LDV2T,M-Q). On entry, an (M-Q)-by-(M-Q) matrix. On exit, V2T is 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 โ€” LDV2T is INTEGER. The leading dimension of the array V2T, LDV2T >= MAX(1,M-Q).
  • B11D โ€” B11D is REAL array, dimension (Q). When CBBCSD converges, B11D contains the cosines of THETA(1), ..., THETA(Q). If CBBCSD fails to converge, then B11D contains the diagonal of the partially reduced top-left block.
  • B11E โ€” B11E is REAL array, dimension (Q-1). When CBBCSD converges, B11E contains zeros. If CBBCSD fails to converge, then B11E contains the superdiagonal of the partially reduced top-left block.
  • B12D โ€” B12D is REAL array, dimension (Q). When CBBCSD converges, B12D contains the negative sines of THETA(1), ..., THETA(Q). If CBBCSD fails to converge, then B12D contains the diagonal of the partially reduced top-right block.
  • B12E โ€” B12E is REAL array, dimension (Q-1). When CBBCSD converges, B12E contains zeros. If CBBCSD fails to converge, then B12E contains the subdiagonal of the partially reduced top-right block.
  • B21D โ€” B21D is REAL array, dimension (Q). When CBBCSD converges, B21D contains the negative sines of THETA(1), ..., THETA(Q). If CBBCSD fails to converge, then B21D contains the diagonal of the partially reduced bottom-left block.
  • B21E โ€” B21E is REAL array, dimension (Q-1). When CBBCSD converges, B21E contains zeros. If CBBCSD fails to converge, then B21E contains the subdiagonal of the partially reduced bottom-left block.
  • B22D โ€” B22D is REAL array, dimension (Q). When CBBCSD converges, B22D contains the negative sines of THETA(1), ..., THETA(Q). If CBBCSD fails to converge, then B22D contains the diagonal of the partially reduced bottom-right block.
  • B22E โ€” B22E is REAL array, dimension (Q-1). When CBBCSD converges, B22E contains zeros. If CBBCSD fails to converge, then B22E contains the subdiagonal of the partially reduced bottom-right block.
  • RWORK โ€” RWORK is REAL array, dimension (MAX(1,LRWORK)). On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
  • LRWORK โ€” LRWORK is INTEGER. The dimension of the array RWORK. 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 โ€” INFO is INTEGER. = 0: successful exit. < 0: if INFO = -i, the i-th argument had an illegal value. > 0: if CBBCSD did not converge, INFO specifies the number of nonzero entries in PHI, and B11D, B11E, etc., contain the partially reduced matrix.

โš™๏ธ Internal Parameters

  • TOLMUL โ€” REAL, 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 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 โ€” 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.
  • 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.
  • 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). 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: 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 โ€” 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.

๐Ÿ“š References ๐Ÿ“š

  1. [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': U1 is updated; otherwise: U1 is not updated.
  • JOBU2 โ€” CHARACTER. = 'Y': U2 is updated; otherwise: U2 is not updated.
  • JOBV1T โ€” CHARACTER. = 'Y': V1T is updated; otherwise: V1T is not updated.
  • JOBV2T โ€” CHARACTER. = 'Y': V2T is updated; otherwise: V2T is not updated.
  • TRANS โ€” 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 โ€” INTEGER. The number of rows and columns in X, the orthogonal matrix in bidiagonal-block form.
  • P โ€” INTEGER. The number of rows in the top-left block of X. 0 <= P <= M.
  • Q โ€” INTEGER. The number of columns in the top-left block of X. 0 <= Q <= MIN(P,M-P,M-Q).
  • THETA โ€” REAL 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 โ€” REAL 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 โ€” REAL 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 โ€” INTEGER. The leading dimension of the array U1, LDU1 >= MAX(1,P).
  • U2 โ€” REAL 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 โ€” INTEGER. The leading dimension of the array U2, LDU2 >= MAX(1,M-P).
  • V1T โ€” REAL 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 โ€” INTEGER. The leading dimension of the array V1T, LDV1T >= MAX(1,Q).
  • V2T โ€” REAL 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 0 ] and [ B22 0 0 ; 0 0 I ].
  • LDV2T โ€” INTEGER. The leading dimension of the array V2T, LDV2T >= MAX(1,M-Q).
  • B11D โ€” REAL array, dimension (Q). When SBBCSD converges, B11D contains the cosines of THETA(1), ..., THETA(Q). If SBBCSD fails to converge, then B11D contains the diagonal of the partially reduced top-left block.
  • B11E โ€” REAL array, dimension (Q-1). When SBBCSD converges, B11E contains zeros. If SBBCSD fails to converge, then B11E contains the superdiagonal of the partially reduced top-left block.
  • B12D โ€” REAL array, dimension (Q). When SBBCSD converges, B12D contains the negative sines of THETA(1), ..., THETA(Q). If SBBCSD fails to converge, then B12D contains the diagonal of the partially reduced top-right block.
  • B12E โ€” REAL array, dimension (Q-1). When SBBCSD converges, B12E contains zeros. If SBBCSD fails to converge, then B12E contains the subdiagonal of the partially reduced top-right block.
  • B21D โ€” REAL array, dimension (Q). When SBBCSD converges, B21D contains the negative sines of THETA(1), ..., THETA(Q). If SBBCSD fails to converge, then B21D contains the diagonal of the partially reduced bottom-left block.
  • B21E โ€” REAL array, dimension (Q-1). When SBBCSD converges, B21E contains zeros. If SBBCSD fails to converge, then B21E contains the subdiagonal of the partially reduced bottom-left block.
  • B22D โ€” REAL array, dimension (Q). When SBBCSD converges, B22D contains the negative sines of THETA(1), ..., THETA(Q). If SBBCSD fails to converge, then B22D contains the diagonal of the partially reduced bottom-right block.
  • B22E โ€” REAL array, dimension (Q-1). When SBBCSD converges, B22E contains zeros. If SBBCSD fails to converge, then B22E contains the subdiagonal of the partially reduced bottom-right block.
  • WORK โ€” REAL array, dimension (MAX(1,LWORK)). On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
  • LWORK โ€” INTEGER. The dimension of the array WORK. 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: if INFO = -i, the i-th argument had an illegal value. > 0: if SBBCSD did not converge, INFO specifies the number of nonzero entries in PHI, and B11D, B11E, etc., contain the partially reduced matrix.

๐Ÿงš Internal Parameters:

  • TOLMUL โ€” REAL, 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 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 โ€” 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 unitary 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. ๐ŸŒธ
  • 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 COMPLEX*16 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 COMPLEX*16 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 COMPLEX*16 array, dimension (LDV1T,Q). On entry, a Q-by-Q matrix. On exit, V1T is premultiplied by the conjugate 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 COMPLEX*16 array, dimension (LDV2T,M-Q). On entry, an (M-Q)-by-(M-Q) matrix. On exit, V2T is 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 โ€” LDV2T is INTEGER. The leading dimension of the array V2T, LDV2T >= MAX(1,M-Q). ๐Ÿ’ซ
  • B11D โ€” B11D is DOUBLE PRECISION array, dimension (Q). When ZBBCSD converges, B11D contains the cosines of THETA(1), ..., THETA(Q). If ZBBCSD fails to converge, then B11D contains the diagonal of the partially reduced top-left block. ๐ŸŒธ
  • B11E โ€” B11E is DOUBLE PRECISION array, dimension (Q-1). When ZBBCSD converges, B11E contains zeros. If ZBBCSD fails to converge, then B11E contains the superdiagonal of the partially reduced top-left block. ๐Ÿ’œ
  • B12D โ€” B12D is DOUBLE PRECISION array, dimension (Q). When ZBBCSD converges, B12D contains the negative sines of THETA(1), ..., THETA(Q). If ZBBCSD 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 ZBBCSD converges, B12E contains zeros. If ZBBCSD fails to converge, then B12E contains the subdiagonal of the partially reduced top-right block. โœจ
  • B21D โ€” B21D is DOUBLE PRECISION array, dimension (Q). When ZBBCSD converges, B21D contains the negative sines of THETA(1), ..., THETA(Q). If ZBBCSD 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 ZBBCSD converges, B21E contains zeros. If ZBBCSD fails to converge, then B21E contains the subdiagonal of the partially reduced bottom-left block. ๐ŸŽ€
  • B22D โ€” B22D is DOUBLE PRECISION array, dimension (Q). When ZBBCSD converges, B22D contains the negative sines of THETA(1), ..., THETA(Q). If ZBBCSD 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 ZBBCSD converges, B22E contains zeros. If ZBBCSD fails to converge, then B22E contains the subdiagonal of the partially reduced bottom-right block. ๐ŸŒˆ
  • RWORK โ€” RWORK is DOUBLE PRECISION array, dimension (MAX(1,LRWORK)). On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK. โญ
  • LRWORK โ€” LRWORK is INTEGER. The dimension of the array RWORK. 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 โ€” INFO is INTEGER. = 0: successful exit. < 0: if INFO = -i, the i-th argument had an illegal value. > 0: if ZBBCSD 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. ๐ŸŒ€

๐Ÿ“š 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