1CBDSQR(1) LAPACK routine (version 3.2) CBDSQR(1)
2
3
4
6 CBDSQR - computes the singular values and, optionally, the right and/or
7 left singular vectors from the singular value decomposition (SVD) of a
8 real N-by-N (upper or lower) bidiagonal matrix B using the implicit
9 zero-shift QR algorithm
10
12 SUBROUTINE CBDSQR( UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U, LDU, C,
13 LDC, RWORK, INFO )
14
15 CHARACTER UPLO
16
17 INTEGER INFO, LDC, LDU, LDVT, N, NCC, NCVT, NRU
18
19 REAL D( * ), E( * ), RWORK( * )
20
21 COMPLEX C( LDC, * ), U( LDU, * ), VT( LDVT, * )
22
24 CBDSQR computes the singular values and, optionally, the right and/or
25 left singular vectors from the singular value decomposition (SVD) of a
26 real N-by-N (upper or lower) bidiagonal matrix B using the implicit
27 zero-shift QR algorithm. The SVD of B has the form
28 B = Q * S * P**H
29 where S is the diagonal matrix of singular values, Q is an orthogonal
30 matrix of left singular vectors, and P is an orthogonal matrix of right
31 singular vectors. If left singular vectors are requested, this subrou‐
32 tine actually returns U*Q instead of Q, and, if right singular vectors
33 are requested, this subroutine returns P**H*VT instead of P**H, for
34 given complex input matrices U and VT. When U and VT are the unitary
35 matrices that reduce a general matrix A to bidiagonal form: A = U*B*VT,
36 as computed by CGEBRD, then
37 A = (U*Q) * S * (P**H*VT)
38 is the SVD of A. Optionally, the subroutine may also compute Q**H*C
39 for a given complex input matrix C.
40 See "Computing Small Singular Values of Bidiagonal Matrices With Guar‐
41 anteed High Relative Accuracy," by J. Demmel and W. Kahan, LAPACK Work‐
42 ing Note #3 (or SIAM J. Sci. Statist. Comput. vol. 11, no. 5, pp.
43 873-912, Sept 1990) and
44 "Accurate singular values and differential qd algorithms," by B. Par‐
45 lett and V. Fernando, Technical Report CPAM-554, Mathematics Depart‐
46 ment, University of California at Berkeley, July 1992 for a detailed
47 description of the algorithm.
48
50 UPLO (input) CHARACTER*1
51 = 'U': B is upper bidiagonal;
52 = 'L': B is lower bidiagonal.
53
54 N (input) INTEGER
55 The order of the matrix B. N >= 0.
56
57 NCVT (input) INTEGER
58 The number of columns of the matrix VT. NCVT >= 0.
59
60 NRU (input) INTEGER
61 The number of rows of the matrix U. NRU >= 0.
62
63 NCC (input) INTEGER
64 The number of columns of the matrix C. NCC >= 0.
65
66 D (input/output) REAL array, dimension (N)
67 On entry, the n diagonal elements of the bidiagonal matrix B.
68 On exit, if INFO=0, the singular values of B in decreasing
69 order.
70
71 E (input/output) REAL array, dimension (N-1)
72 On entry, the N-1 offdiagonal elements of the bidiagonal matrix
73 B. On exit, if INFO = 0, E is destroyed; if INFO > 0, D and E
74 will contain the diagonal and superdiagonal elements of a bidi‐
75 agonal matrix orthogonally equivalent to the one given as
76 input.
77
78 VT (input/output) COMPLEX array, dimension (LDVT, NCVT)
79 On entry, an N-by-NCVT matrix VT. On exit, VT is overwritten
80 by P**H * VT. Not referenced if NCVT = 0.
81
82 LDVT (input) INTEGER
83 The leading dimension of the array VT. LDVT >= max(1,N) if
84 NCVT > 0; LDVT >= 1 if NCVT = 0.
85
86 U (input/output) COMPLEX array, dimension (LDU, N)
87 On entry, an NRU-by-N matrix U. On exit, U is overwritten by U
88 * Q. Not referenced if NRU = 0.
89
90 LDU (input) INTEGER
91 The leading dimension of the array U. LDU >= max(1,NRU).
92
93 C (input/output) COMPLEX array, dimension (LDC, NCC)
94 On entry, an N-by-NCC matrix C. On exit, C is overwritten by
95 Q**H * C. Not referenced if NCC = 0.
96
97 LDC (input) INTEGER
98 The leading dimension of the array C. LDC >= max(1,N) if NCC >
99 0; LDC >=1 if NCC = 0.
100
101 RWORK (workspace) REAL array, dimension (2*N)
102 if NCVT = NRU = NCC = 0, (max(1, 4*N-4)) otherwise
103
104 INFO (output) INTEGER
105 = 0: successful exit
106 < 0: If INFO = -i, the i-th argument had an illegal value
107 > 0: the algorithm did not converge; D and E contain the ele‐
108 ments of a bidiagonal matrix which is orthogonally similar to
109 the input matrix B; if INFO = i, i elements of E have not con‐
110 verged to zero.
111
113 TOLMUL REAL, default = max(10,min(100,EPS**(-1/8)))
114 TOLMUL controls the convergence criterion of the QR loop. If
115 it is positive, TOLMUL*EPS is the desired relative precision in
116 the computed singular values. If it is negative, abs(TOL‐
117 MUL*EPS*sigma_max) is the desired absolute accuracy in the com‐
118 puted singular values (corresponds to relative accuracy
119 abs(TOLMUL*EPS) in the largest singular value. abs(TOLMUL)
120 should be between 1 and 1/EPS, and preferably between 10 (for
121 fast convergence) and .1/EPS (for there to be some accuracy in
122 the results). Default is to lose at either one eighth or 2 of
123 the available decimal digits in each computed singular value
124 (whichever is smaller).
125
126 MAXITR INTEGER, default = 6
127 MAXITR controls the maximum number of passes of the algorithm
128 through its inner loop. The algorithms stops (and so fails to
129 converge) if the number of passes through the inner loop
130 exceeds MAXITR*N**2.
131
132
133
134 LAPACK routine (version 3.2) November 2008 CBDSQR(1)