1SLASD6(1)           LAPACK auxiliary routine (version 3.2)           SLASD6(1)
2
3
4

NAME

6       SLASD6  -  computes  the  SVD  of  an updated upper bidiagonal matrix B
7       obtained by merging two smaller ones by appending a row
8

SYNOPSIS

10       SUBROUTINE SLASD6( ICOMPQ, NL, NR, SQRE, D, VF, VL, ALPHA, BETA,  IDXQ,
11                          PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM, POLES,
12                          DIFL, DIFR, Z, K, C, S, WORK, IWORK, 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, * ), IDXQ( * ), IWORK( * ), PERM( *
20                          )
21
22           REAL           D( * ), DIFL( * ), DIFR( * ), GIVNUM( LDGNUM,  *  ),
23                          POLES(  LDGNUM, * ), VF( * ), VL( * ), WORK( * ), Z(
24                          * )
25

PURPOSE

27       SLASD6 computes the  SVD  of  an  updated  upper  bidiagonal  matrix  B
28       obtained  by  merging two smaller ones by appending a row. This routine
29       is used only for the problem which requires  all  singular  values  and
30       optionally  singular  vector matrices in factored form.  B is an N-by-M
31       matrix with N = NL + NR + 1 and M = N + SQRE.   A  related  subroutine,
32       SLASD1, handles the case in which all singular values and singular vec‐
33       tors of the bidiagonal matrix are desired.  SLASD6 computes the SVD  as
34       follows:
35                     ( D1(in)  0    0     0 )
36         B = U(in) * (   Z1'   a   Z2'    b ) * VT(in)
37                     (   0     0   D2(in) 0 )
38           = U(out) * ( D(out) 0) * VT(out)
39       where  Z'  =  (Z1'  a Z2' b) = u' VT', and u is a vector of dimension M
40       with ALPHA and BETA in the NL+1 and NL+2 th  entries  and  zeros  else‐
41       where; and the entry b is empty if SQRE = 0.
42       The singular values of B can be computed using D1, D2, the first compo‐
43       nents of all the right singular vectors of the  lower  block,  and  the
44       last  components  of all the right singular vectors of the upper block.
45       These components are stored and updated in VF and VL, respectively,  in
46       SLASD6. Hence U and VT are not explicitly referenced.
47       The  singular  values  are  stored  in D. The algorithm consists of two
48       stages:
49             The first stage consists of deflating the size of the problem
50             when there are multiple singular values or if there is a zero
51             in the Z vector. For each such occurence the dimension of the
52             secular equation problem is reduced by one. This stage is
53             performed by the routine SLASD7.
54             The second stage consists of calculating the updated
55             singular values. This is done by finding the roots of the
56             secular equation via the routine SLASD4 (as called by SLASD8).
57             This routine also updates VF and VL and computes the distances
58             between the updated singular values and the old singular
59             values.
60       SLASD6 is called from SLASDA.
61

ARGUMENTS

63       ICOMPQ (input) INTEGER Specifies whether singular  vectors  are  to  be
64       computed in factored form:
65       = 0: Compute singular values only.
66       = 1: Compute singular vectors in factored form as well.
67
68       NL     (input) INTEGER
69              The row dimension of the upper block.  NL >= 1.
70
71       NR     (input) INTEGER
72              The row dimension of the lower block.  NR >= 1.
73
74       SQRE   (input) INTEGER
75              = 0: the lower block is an NR-by-NR square matrix.
76              = 1: the lower block is an NR-by-(NR+1) rectangular matrix.  The
77              bidiagonal matrix has row dimension N = NL + NR + 1, and  column
78              dimension M = N + SQRE.
79
80       D      (input/output) REAL array, dimension (NL+NR+1).
81              On entry D(1:NL,1:NL) contains the singular values of the
82              upper block, and D(NL+2:N) contains the singular values
83              of  the lower block. On exit D(1:N) contains the singular values
84              of the modified matrix.
85
86       VF     (input/output) REAL array, dimension (M)
87              On entry, VF(1:NL+1) contains the first components of all
88              right singular vectors of the upper block; and  VF(NL+2:M)  con‐
89              tains  the first components of all right singular vectors of the
90              lower block. On exit, VF contains the first  components  of  all
91              right singular vectors of the bidiagonal matrix.
92
93       VL     (input/output) REAL array, dimension (M)
94              On entry, VL(1:NL+1) contains the  last components of all
95              right  singular  vectors of the upper block; and VL(NL+2:M) con‐
96              tains the last components of all right singular vectors  of  the
97              lower  block.  On  exit,  VL contains the last components of all
98              right singular vectors of the bidiagonal matrix.
99
100       ALPHA  (input/output) REAL
101              Contains the diagonal element associated with the added row.
102
103       BETA   (input/output) REAL
104              Contains the off-diagonal element associated with the added row.
105
106       IDXQ   (output) INTEGER array, dimension (N)
107              This contains the permutation which will  reintegrate  the  sub‐
108              problem  just  solved back into sorted order, i.e.  D( IDXQ( I =
109              1, N ) ) will be in ascending order.
110
111       PERM   (output) INTEGER array, dimension ( N )
112              The permutations (from deflation and sorting) to be  applied  to
113              each block. Not referenced if ICOMPQ = 0.  GIVPTR (output) INTE‐
114              GER The number of Givens rotations which took place in this sub‐
115              problem.  Not referenced if ICOMPQ = 0.  GIVCOL (output) INTEGER
116              array, dimension ( LDGCOL, 2 ) Each pair of numbers indicates  a
117              pair  of  columns to take place in a Givens rotation. Not refer‐
118              enced if ICOMPQ = 0.  LDGCOL (input) INTEGER  leading  dimension
119              of  GIVCOL,  must  be  at  least N.  GIVNUM (output) REAL array,
120              dimension ( LDGNUM, 2 ) Each number indicates the C or  S  value
121              to  be used in the corresponding Givens rotation. Not referenced
122              if ICOMPQ = 0.  LDGNUM (input) INTEGER The leading dimension  of
123              GIVNUM and POLES, must be at least N.
124
125       POLES  (output) REAL array, dimension ( LDGNUM, 2 )
126              On exit, POLES(1,*) is an array containing the new singular val‐
127              ues obtained from solving the secular equation,  and  POLES(2,*)
128              is  an  array  containing the poles in the secular equation. Not
129              referenced if ICOMPQ = 0.
130
131       DIFL   (output) REAL array, dimension ( N )
132              On exit, DIFL(I) is the distance  between  I-th  updated  (unde‐
133              flated)  singular  value  and the I-th (undeflated) old singular
134              value.
135
136       DIFR   (output) REAL array,
137              dimension ( LDGNUM, 2 ) if ICOMPQ = 1 and dimension  (  N  )  if
138              ICOMPQ  =  0.   On exit, DIFR(I, 1) is the distance between I-th
139              updated (undeflated) singular value and the I+1-th  (undeflated)
140              old singular value.  If ICOMPQ = 1, DIFR(1:K,2) is an array con‐
141              taining the normalizing factors for the  right  singular  vector
142              matrix.  See SLASD8 for details on DIFL and DIFR.
143
144       Z      (output) REAL array, dimension ( M )
145              The  first  elements of this array contain the components of the
146              deflation-adjusted updating row vector.
147
148       K      (output) INTEGER
149              Contains the dimension of the non-deflated matrix, This  is  the
150              order of the related secular equation. 1 <= K <=N.
151
152       C      (output) REAL
153              C  contains garbage if SQRE =0 and the C-value of a Givens rota‐
154              tion related to the right null space if SQRE = 1.
155
156       S      (output) REAL
157              S contains garbage if SQRE =0 and the S-value of a Givens  rota‐
158              tion related to the right null space if SQRE = 1.
159
160       WORK   (workspace) REAL array, dimension ( 4 * M )
161
162       IWORK  (workspace) INTEGER array, dimension ( 3 * N )
163
164       INFO   (output) INTEGER
165              = 0:  successful exit.
166              < 0:  if INFO = -i, the i-th argument had an illegal value.
167              > 0:  if INFO = 1, an singular value did not converge
168

FURTHER DETAILS

170       Based on contributions by
171          Ming Gu and Huan Ren, Computer Science Division, University of
172          California at Berkeley, USA
173
174
175
176 LAPACK auxiliary routine (versionNo3v.e2m)ber 2008                       SLASD6(1)
Impressum