1DLASDA(1) LAPACK auxiliary routine (version 3.2) DLASDA(1)
2
3
4
6 DLASDA - a divide and conquer approach, DLASDA 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 DLASDA( 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 DOUBLE PRECISION C( * ), D( * ), DIFL( LDU, * ), DIFR( LDU,
21 * ), E( * ), GIVNUM( LDU, * ), POLES( LDU, * ), S( *
22 ), U( LDU, * ), VT( LDU, * ), WORK( * ), Z( LDU, * )
23
25 Using a divide and conquer approach, DLASDA 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, DLASD0, 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) DOUBLE PRECISION 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) DOUBLE PRECISION array, dimension ( M-1 )
54 Contains the subdiagonal entries of the bidiagonal matrix. On
55 exit, E has been destroyed.
56
57 U (output) DOUBLE PRECISION 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) DOUBLE PRECISION 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,
72 dimension ( N ) if ICOMPQ = 1 and dimension 1 if ICOMPQ = 0. If
73 ICOMPQ = 1, on exit, K(I) is the dimension of the I-th secular
74 equation on the computation tree.
75
76 DIFL (output) DOUBLE PRECISION array, dimension ( LDU, NLVL ),
77 where NLVL = floor(log_2 (N/SMLSIZ))).
78
79 DIFR (output) DOUBLE PRECISION 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 DLASD8 for details.
86
87 Z (output) DOUBLE PRECISION 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) DOUBLE PRECISION 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,
110 dimension ( LDGCOL, NLVL ) if ICOMPQ = 1, and not referenced if
111 ICOMPQ = 0. If ICOMPQ = 1, on exit, PERM(1, I) records permuta‐
112 tions done on the I-th level of the computation tree. GIVNUM
113 (output) DOUBLE PRECISION array, dimension ( LDU, 2 * NLVL ) if
114 ICOMPQ = 1, and not referenced if ICOMPQ = 0. If ICOMPQ = 1, on
115 exit, for each I, GIVNUM(1, 2 *I - 1) and GIVNUM(1, 2 *I) record
116 the C- and S- values of Givens rotations performed on the I-th
117 level on the computation tree.
118
119 C (output) DOUBLE PRECISION array,
120 dimension ( N ) if ICOMPQ = 1, and dimension 1 if ICOMPQ = 0.
121 If ICOMPQ = 1 and the I-th subproblem is not square, on exit, C(
122 I ) contains the C-value of a Givens rotation related to the
123 right null space of the I-th subproblem.
124
125 S (output) DOUBLE PRECISION array, dimension ( N ) if
126 ICOMPQ = 1, and dimension 1 if ICOMPQ = 0. If ICOMPQ = 1 and the
127 I-th subproblem is not square, on exit, S( I ) contains the S-
128 value of a Givens rotation related to the right null space of
129 the I-th subproblem.
130
131 WORK (workspace) DOUBLE PRECISION array, dimension
132 (6 * N + (SMLSIZ + 1)*(SMLSIZ + 1)).
133
134 IWORK (workspace) INTEGER array.
135 Dimension must be at least (7 * N).
136
137 INFO (output) INTEGER
138 = 0: successful exit.
139 < 0: if INFO = -i, the i-th argument had an illegal value.
140 > 0: if INFO = 1, an singular value did not converge
141
143 Based on contributions by
144 Ming Gu and Huan Ren, Computer Science Division, University of
145 California at Berkeley, USA
146
147
148
149 LAPACK auxiliary routine (versionNo3v.e2m)ber 2008 DLASDA(1)