LAPACK
3.4.2
LAPACK: Linear Algebra PACKage

Go to the source code of this file.
Functions/Subroutines  
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) 
SBBCSD 
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
Download SBBCSD + dependencies [TGZ] [ZIP] [TXT]SBBCSD computes the CS decomposition of an orthogonal matrix in bidiagonalblock form, [ 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 MbyM, its topleft block is PbyQ, and Q must be no larger than P, MP, or MQ. (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:Q1). The orthogonal matrices U1, U2, V1T, and V2T are input/output. The input matrices are pre or postmultiplied by the appropriate singular vector matrices.
[in]  JOBU1  JOBU1 is CHARACTER = 'Y': U1 is updated; otherwise: U1 is not updated. 
[in]  JOBU2  JOBU2 is CHARACTER = 'Y': U2 is updated; otherwise: U2 is not updated. 
[in]  JOBV1T  JOBV1T is CHARACTER = 'Y': V1T is updated; otherwise: V1T is not updated. 
[in]  JOBV2T  JOBV2T is CHARACTER = 'Y': V2T is updated; otherwise: V2T is not updated. 
[in]  TRANS  TRANS is CHARACTER = 'T': X, U1, U2, V1T, and V2T are stored in rowmajor order; otherwise: X, U1, U2, V1T, and V2T are stored in column major order. 
[in]  M  M is INTEGER The number of rows and columns in X, the orthogonal matrix in bidiagonalblock form. 
[in]  P  P is INTEGER The number of rows in the topleft block of X. 0 <= P <= M. 
[in]  Q  Q is INTEGER The number of columns in the topleft block of X. 0 <= Q <= MIN(P,MP,MQ). 
[in,out]  THETA  THETA is REAL array, dimension (Q) On entry, the angles THETA(1),...,THETA(Q) that, along with PHI(1), ...,PHI(Q1), define the matrix in bidiagonalblock form. On exit, the angles whose cosines and sines define the diagonal blocks in the CS decomposition. 
[in,out]  PHI  PHI is REAL array, dimension (Q1) The angles PHI(1),...,PHI(Q1) that, along with THETA(1),..., THETA(Q), define the matrix in bidiagonalblock form. 
[in,out]  U1  U1 is REAL array, dimension (LDU1,P) On entry, an LDU1byP matrix. On exit, U1 is postmultiplied by the left singular vector matrix common to [ B11 ; 0 ] and [ B12 0 0 ; 0 I 0 0 ]. 
[in]  LDU1  LDU1 is INTEGER The leading dimension of the array U1. 
[in,out]  U2  U2 is REAL array, dimension (LDU2,MP) On entry, an LDU2by(MP) matrix. On exit, U2 is postmultiplied by the left singular vector matrix common to [ B21 ; 0 ] and [ B22 0 0 ; 0 0 I ]. 
[in]  LDU2  LDU2 is INTEGER The leading dimension of the array U2. 
[in,out]  V1T  V1T is REAL array, dimension (LDV1T,Q) On entry, a LDV1TbyQ matrix. On exit, V1T is premultiplied by the transpose of the right singular vector matrix common to [ B11 ; 0 ] and [ B21 ; 0 ]. 
[in]  LDV1T  LDV1T is INTEGER The leading dimension of the array V1T. 
[in,out]  V2T  V2T is REAL array, dimenison (LDV2T,MQ) On entry, a LDV2Tby(MQ) 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 ]. 
[in]  LDV2T  LDV2T is INTEGER The leading dimension of the array V2T. 
[out]  B11D  B11D is 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 topleft block. 
[out]  B11E  B11E is REAL array, dimension (Q1) When SBBCSD converges, B11E contains zeros. If SBBCSD fails to converge, then B11E contains the superdiagonal of the partially reduced topleft block. 
[out]  B12D  B12D is 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 topright block. 
[out]  B12E  B12E is REAL array, dimension (Q1) When SBBCSD converges, B12E contains zeros. If SBBCSD fails to converge, then B12E contains the subdiagonal of the partially reduced topright block. 
[out]  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 bottomleft block. 
[out]  B21E  B21E is REAL array, dimension (Q1) When CBBCSD converges, B21E contains zeros. If CBBCSD fails to converge, then B21E contains the subdiagonal of the partially reduced bottomleft block. 
[out]  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 bottomright block. 
[out]  B22E  B22E is REAL array, dimension (Q1) When CBBCSD converges, B22E contains zeros. If CBBCSD fails to converge, then B22E contains the subdiagonal of the partially reduced bottomright block. 
[out]  WORK  WORK is REAL array, dimension (MAX(1,LWORK)) On exit, if INFO = 0, WORK(1) returns the optimal LWORK. 
[in]  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. 
[out]  INFO  INFO is INTEGER = 0: successful exit. < 0: if INFO = i, the ith 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. 
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.
Definition at line 330 of file sbbcsd.f.