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