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