1DLASD7(1) LAPACK auxiliary routine (version 3.1) DLASD7(1)
2
3
4
6 DLASD7 - the two sets of singular values together into a single sorted
7 set
8
10 SUBROUTINE DLASD7( ICOMPQ, NL, NR, SQRE, K, D, Z, ZW, VF, VFW, VL, VLW,
11 ALPHA, BETA, DSIGMA, IDX, IDXP, IDXQ, PERM, GIVPTR,
12 GIVCOL, LDGCOL, GIVNUM, LDGNUM, C, S, INFO )
13
14 INTEGER GIVPTR, ICOMPQ, INFO, K, LDGCOL, LDGNUM, NL, NR,
15 SQRE
16
17 DOUBLE PRECISION ALPHA, BETA, C, S
18
19 INTEGER GIVCOL( LDGCOL, * ), IDX( * ), IDXP( * ), IDXQ( * ),
20 PERM( * )
21
22 DOUBLE PRECISION D( * ), DSIGMA( * ), GIVNUM( LDGNUM, * ),
23 VF( * ), VFW( * ), VL( * ), VLW( * ), Z( * ), ZW( *
24 )
25
27 DLASD7 merges the two sets of singular values together into a single
28 sorted set. Then it tries to deflate the size of the problem. There are
29 two ways in which deflation can occur: when two or more singular val‐
30 ues are close together or if there is a tiny entry in the Z vector. For
31 each such occurrence the order of the related secular equation problem
32 is reduced by one.
33
34 DLASD7 is called from DLASD6.
35
36
38 ICOMPQ (input) INTEGER
39 Specifies whether singular vectors are to be computed in com‐
40 pact form, as follows:
41 = 0: Compute singular values only.
42 = 1: Compute singular vectors of upper bidiagonal matrix in
43 compact form.
44
45 NL (input) INTEGER
46 The row dimension of the upper block. NL >= 1.
47
48 NR (input) INTEGER
49 The row dimension of the lower block. NR >= 1.
50
51 SQRE (input) INTEGER
52 = 0: the lower block is an NR-by-NR square matrix.
53 = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
54
55 The bidiagonal matrix has N = NL + NR + 1 rows and M = N + SQRE
56 >= N columns.
57
58 K (output) INTEGER
59 Contains the dimension of the non-deflated matrix, this is the
60 order of the related secular equation. 1 <= K <=N.
61
62 D (input/output) DOUBLE PRECISION array, dimension ( N )
63 On entry D contains the singular values of the two submatrices
64 to be combined. On exit D contains the trailing (N-K) updated
65 singular values (those which were deflated) sorted into increas‐
66 ing order.
67
68 Z (output) DOUBLE PRECISION array, dimension ( M )
69 On exit Z contains the updating row vector in the secular equa‐
70 tion.
71
72 ZW (workspace) DOUBLE PRECISION array, dimension ( M )
73 Workspace for Z.
74
75 VF (input/output) DOUBLE PRECISION array, dimension ( M )
76 On entry, VF(1:NL+1) contains the first components of all
77 right singular vectors of the upper block; and VF(NL+2:M) con‐
78 tains the first components of all right singular vectors of the
79 lower block. On exit, VF contains the first components of all
80 right singular vectors of the bidiagonal matrix.
81
82 VFW (workspace) DOUBLE PRECISION array, dimension ( M )
83 Workspace for VF.
84
85 VL (input/output) DOUBLE PRECISION array, dimension ( M )
86 On entry, VL(1:NL+1) contains the last components of all
87 right singular vectors of the upper block; and VL(NL+2:M) con‐
88 tains the last components of all right singular vectors of the
89 lower block. On exit, VL contains the last components of all
90 right singular vectors of the bidiagonal matrix.
91
92 VLW (workspace) DOUBLE PRECISION array, dimension ( M )
93 Workspace for VL.
94
95 ALPHA (input) DOUBLE PRECISION
96 Contains the diagonal element associated with the added row.
97
98 BETA (input) DOUBLE PRECISION
99 Contains the off-diagonal element associated with the added row.
100
101 DSIGMA (output) DOUBLE PRECISION array, dimension ( N ) Contains
102 a copy of the diagonal elements (K-1 singular values and one
103 zero) in the secular equation.
104
105 IDX (workspace) INTEGER array, dimension ( N )
106 This will contain the permutation used to sort the contents of D
107 into ascending order.
108
109 IDXP (workspace) INTEGER array, dimension ( N )
110 This will contain the permutation used to place deflated values
111 of D at the end of the array. On output IDXP(2:K)
112 points to the nondeflated D-values and IDXP(K+1:N) points to the
113 deflated singular values.
114
115 IDXQ (input) INTEGER array, dimension ( N )
116 This contains the permutation which separately sorts the two
117 sub-problems in D into ascending order. Note that entries in
118 the first half of this permutation must first be moved one posi‐
119 tion backward; and entries in the second half must first have
120 NL+1 added to their values.
121
122 PERM (output) INTEGER array, dimension ( N )
123 The permutations (from deflation and sorting) to be applied to
124 each singular block. Not referenced if ICOMPQ = 0.
125
126 GIVPTR (output) INTEGER The number of Givens rotations which
127 took place in this subproblem. Not referenced if ICOMPQ = 0.
128
129 GIVCOL (output) INTEGER array, dimension ( LDGCOL, 2 ) Each pair
130 of numbers indicates a pair of columns to take place in a Givens
131 rotation. Not referenced if ICOMPQ = 0.
132
133 LDGCOL (input) INTEGER The leading dimension of GIVCOL, must be
134 at least N.
135
136 GIVNUM (output) DOUBLE PRECISION array, dimension ( LDGNUM, 2 )
137 Each number indicates the C or S value to be used in the corre‐
138 sponding Givens rotation. Not referenced if ICOMPQ = 0.
139
140 LDGNUM (input) INTEGER The leading dimension of GIVNUM, must be
141 at least N.
142
143 C (output) DOUBLE PRECISION
144 C contains garbage if SQRE =0 and the C-value of a Givens rota‐
145 tion related to the right null space if SQRE = 1.
146
147 S (output) DOUBLE PRECISION
148 S contains garbage if SQRE =0 and the S-value of a Givens rota‐
149 tion related to the right null space if SQRE = 1.
150
151 INFO (output) INTEGER
152 = 0: successful exit.
153 < 0: if INFO = -i, the i-th argument had an illegal value.
154
156 Based on contributions by
157 Ming Gu and Huan Ren, Computer Science Division, University of
158 California at Berkeley, USA
159
160
161
162
163 LAPACK auxiliary routine (versionNo3v.e1m)ber 2006 DLASD7(1)