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