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