1SLASDA(1) LAPACK auxiliary routine (version 3.2) SLASDA(1)
2
3
4
6 SLASDA - a divide and conquer approach, SLASDA computes the singular
7 value decomposition (SVD) of a real upper bidiagonal N-by-M matrix B
8 with diagonal D and offdiagonal E, where M = N + SQRE
9
11 SUBROUTINE SLASDA( ICOMPQ, SMLSIZ, N, SQRE, D, E, U, LDU, VT, K, DIFL,
12 DIFR, Z, POLES, GIVPTR, GIVCOL, LDGCOL, PERM,
13 GIVNUM, C, S, WORK, IWORK, INFO )
14
15 INTEGER ICOMPQ, INFO, LDGCOL, LDU, N, SMLSIZ, SQRE
16
17 INTEGER GIVCOL( LDGCOL, * ), GIVPTR( * ), IWORK( * ), K( *
18 ), PERM( LDGCOL, * )
19
20 REAL C( * ), D( * ), DIFL( LDU, * ), DIFR( LDU, * ), E( *
21 ), GIVNUM( LDU, * ), POLES( LDU, * ), S( * ), U(
22 LDU, * ), VT( LDU, * ), WORK( * ), Z( LDU, * )
23
25 Using a divide and conquer approach, SLASDA computes the singular value
26 decomposition (SVD) of a real upper bidiagonal N-by-M matrix B with
27 diagonal D and offdiagonal E, where M = N + SQRE. The algorithm com‐
28 putes the singular values in the SVD B = U * S * VT. The orthogonal
29 matrices U and VT are optionally computed in compact form.
30 A related subroutine, SLASD0, computes the singular values and the sin‐
31 gular vectors in explicit form.
32
34 ICOMPQ (input) INTEGER Specifies whether singular vectors are to be
35 computed in compact form, as follows = 0: Compute singular values only.
36 = 1: Compute singular vectors of upper bidiagonal matrix in compact
37 form. SMLSIZ (input) INTEGER The maximum size of the subproblems at
38 the bottom of the computation tree.
39
40 N (input) INTEGER
41 The row dimension of the upper bidiagonal matrix. This is also
42 the dimension of the main diagonal array D.
43
44 SQRE (input) INTEGER
45 Specifies the column dimension of the bidiagonal matrix. = 0:
46 The bidiagonal matrix has column dimension M = N;
47 = 1: The bidiagonal matrix has column dimension M = N + 1.
48
49 D (input/output) REAL array, dimension ( N )
50 On entry D contains the main diagonal of the bidiagonal matrix.
51 On exit D, if INFO = 0, contains its singular values.
52
53 E (input) REAL array, dimension ( M-1 )
54 Contains the subdiagonal entries of the bidiagonal matrix. On
55 exit, E has been destroyed.
56
57 U (output) REAL array,
58 dimension ( LDU, SMLSIZ ) if ICOMPQ = 1, and not referenced if
59 ICOMPQ = 0. If ICOMPQ = 1, on exit, U contains the left singular
60 vector matrices of all subproblems at the bottom level.
61
62 LDU (input) INTEGER, LDU = > N.
63 The leading dimension of arrays U, VT, DIFL, DIFR, POLES,
64 GIVNUM, and Z.
65
66 VT (output) REAL array,
67 dimension ( LDU, SMLSIZ+1 ) if ICOMPQ = 1, and not referenced if
68 ICOMPQ = 0. If ICOMPQ = 1, on exit, VT' contains the right sin‐
69 gular vector matrices of all subproblems at the bottom level.
70
71 K (output) INTEGER array, dimension ( N )
72 if ICOMPQ = 1 and dimension 1 if ICOMPQ = 0. If ICOMPQ = 1, on
73 exit, K(I) is the dimension of the I-th secular equation on the
74 computation tree.
75
76 DIFL (output) REAL array, dimension ( LDU, NLVL ),
77 where NLVL = floor(log_2 (N/SMLSIZ))).
78
79 DIFR (output) REAL array,
80 dimension ( LDU, 2 * NLVL ) if ICOMPQ = 1 and dimension ( N ) if
81 ICOMPQ = 0. If ICOMPQ = 1, on exit, DIFL(1:N, I) and DIFR(1:N,
82 2 * I - 1) record distances between singular values on the I-th
83 level and singular values on the (I -1)-th level, and DIFR(1:N,
84 2 * I ) contains the normalizing factors for the right singular
85 vector matrix. See SLASD8 for details.
86
87 Z (output) REAL array,
88 dimension ( LDU, NLVL ) if ICOMPQ = 1 and dimension ( N ) if
89 ICOMPQ = 0. The first K elements of Z(1, I) contain the compo‐
90 nents of the deflation-adjusted updating row vector for subprob‐
91 lems on the I-th level.
92
93 POLES (output) REAL array,
94 dimension ( LDU, 2 * NLVL ) if ICOMPQ = 1, and not referenced if
95 ICOMPQ = 0. If ICOMPQ = 1, on exit, POLES(1, 2*I - 1) and
96 POLES(1, 2*I) contain the new and old singular values involved
97 in the secular equations on the I-th level. GIVPTR (output)
98 INTEGER array, dimension ( N ) if ICOMPQ = 1, and not referenced
99 if ICOMPQ = 0. If ICOMPQ = 1, on exit, GIVPTR( I ) records the
100 number of Givens rotations performed on the I-th problem on the
101 computation tree. GIVCOL (output) INTEGER array, dimension (
102 LDGCOL, 2 * NLVL ) if ICOMPQ = 1, and not referenced if ICOMPQ =
103 0. If ICOMPQ = 1, on exit, for each I, GIVCOL(1, 2 *I - 1) and
104 GIVCOL(1, 2 *I) record the locations of Givens rotations per‐
105 formed on the I-th level on the computation tree. LDGCOL
106 (input) INTEGER, LDGCOL = > N. The leading dimension of arrays
107 GIVCOL and PERM.
108
109 PERM (output) INTEGER array, dimension ( LDGCOL, NLVL )
110 if ICOMPQ = 1, and not referenced if ICOMPQ = 0. If ICOMPQ = 1,
111 on exit, PERM(1, I) records permutations done on the I-th level
112 of the computation tree. GIVNUM (output) REAL array, dimension
113 ( LDU, 2 * NLVL ) if ICOMPQ = 1, and not referenced if ICOMPQ =
114 0. If ICOMPQ = 1, on exit, for each I, GIVNUM(1, 2 *I - 1) and
115 GIVNUM(1, 2 *I) record the C- and S- values of Givens rotations
116 performed on the I-th level on the computation tree.
117
118 C (output) REAL array,
119 dimension ( N ) if ICOMPQ = 1, and dimension 1 if ICOMPQ = 0.
120 If ICOMPQ = 1 and the I-th subproblem is not square, on exit, C(
121 I ) contains the C-value of a Givens rotation related to the
122 right null space of the I-th subproblem.
123
124 S (output) REAL array, dimension ( N ) if
125 ICOMPQ = 1, and dimension 1 if ICOMPQ = 0. If ICOMPQ = 1 and the
126 I-th subproblem is not square, on exit, S( I ) contains the S-
127 value of a Givens rotation related to the right null space of
128 the I-th subproblem.
129
130 WORK (workspace) REAL array, dimension
131 (6 * N + (SMLSIZ + 1)*(SMLSIZ + 1)).
132
133 IWORK (workspace) INTEGER array, dimension (7*N).
134
135 INFO (output) INTEGER
136 = 0: successful exit.
137 < 0: if INFO = -i, the i-th argument had an illegal value.
138 > 0: if INFO = 1, an singular value did not converge
139
141 Based on contributions by
142 Ming Gu and Huan Ren, Computer Science Division, University of
143 California at Berkeley, USA
144
145
146
147 LAPACK auxiliary routine (versionNo3v.e2m)ber 2008 SLASDA(1)