1DLALS0(1)                LAPACK routine (version 3.2)                DLALS0(1)
2
3
4

NAME

6       DLALS0 - applies back the multiplying factors of either the left or the
7       right singular vector matrix of a diagonal matrix appended by a row  to
8       the right hand side matrix B in solving the least squares problem using
9       the divide-and-conquer SVD approach
10

SYNOPSIS

12       SUBROUTINE DLALS0( ICOMPQ, NL, NR, SQRE, NRHS, B, LDB, BX, LDBX,  PERM,
13                          GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM, POLES, DIFL,
14                          DIFR, Z, K, C, S, WORK, INFO )
15
16           INTEGER        GIVPTR, ICOMPQ, INFO, K, LDB, LDBX, LDGCOL,  LDGNUM,
17                          NL, NR, NRHS, SQRE
18
19           DOUBLE         PRECISION C, S
20
21           INTEGER        GIVCOL( LDGCOL, * ), PERM( * )
22
23           DOUBLE         PRECISION  B(  LDB,  *  ), BX( LDBX, * ), DIFL( * ),
24                          DIFR( LDGNUM, *  ),  GIVNUM(  LDGNUM,  *  ),  POLES(
25                          LDGNUM, * ), WORK( * ), Z( * )
26

PURPOSE

28       DLALS0  applies  back the multiplying factors of either the left or the
29       right singular vector matrix of a diagonal matrix appended by a row  to
30       the right hand side matrix B in solving the least squares problem using
31       the divide-and-conquer SVD approach.   For  the  left  singular  vector
32       matrix, three types of orthogonal matrices are involved:
33       (1L) Givens rotations: the number of such rotations is GIVPTR; the
34            pairs of columns/rows they were applied to are stored in GIVCOL;
35            and  the  C- and S-values of these rotations are stored in GIVNUM.
36       (2L) Permutation. The (NL+1)-st row of B is to be moved to the first
37            row, and for J=2:N, PERM(J)-th row of B is to be moved to the
38            J-th row.
39       (3L) The left singular vector matrix of the remaining matrix.  For  the
40       right  singular  vector  matrix,  four types of orthogonal matrices are
41       involved:
42       (1R) The right singular vector matrix of the remaining matrix.  (2R) If
43       SQRE = 1, one extra Givens rotation to generate the right
44            null space.
45       (3R) The inverse transformation of (2L).
46       (4R) The inverse transformation of (1L).
47

ARGUMENTS

49       ICOMPQ  (input)  INTEGER  Specifies  whether singular vectors are to be
50       computed in factored form:
51       = 0: Left singular vector matrix.
52       = 1: Right singular vector matrix.
53
54       NL     (input) INTEGER
55              The row dimension of the upper block. NL >= 1.
56
57       NR     (input) INTEGER
58              The row dimension of the lower block. NR >= 1.
59
60       SQRE   (input) INTEGER
61              = 0: the lower block is an NR-by-NR square matrix.
62              = 1: the lower block is an NR-by-(NR+1) rectangular matrix.  The
63              bidiagonal  matrix has row dimension N = NL + NR + 1, and column
64              dimension M = N + SQRE.
65
66       NRHS   (input) INTEGER
67              The number of columns of B and BX. NRHS must be at least 1.
68
69       B      (input/output) DOUBLE PRECISION array, dimension ( LDB, NRHS )
70              On input, B contains the right hand sides of the  least  squares
71              problem  in rows 1 through M. On output, B contains the solution
72              X in rows 1 through N.
73
74       LDB    (input) INTEGER
75              The leading dimension of B. LDB must be at least max(1,MAX( M, N
76              ) ).
77
78       BX     (workspace) DOUBLE PRECISION array, dimension ( LDBX, NRHS )
79
80       LDBX   (input) INTEGER
81              The leading dimension of BX.
82
83       PERM   (input) INTEGER array, dimension ( N )
84              The permutations (from deflation and sorting) applied to the two
85              blocks.  GIVPTR (input) INTEGER The number of  Givens  rotations
86              which  took  place  in  this subproblem.  GIVCOL (input) INTEGER
87              array, dimension ( LDGCOL, 2 ) Each pair of numbers indicates  a
88              pair  of  rows/columns  involved  in  a Givens rotation.  LDGCOL
89              (input) INTEGER The leading dimension  of  GIVCOL,  must  be  at
90              least  N.   GIVNUM  (input)  DOUBLE PRECISION array, dimension (
91              LDGNUM, 2 ) Each number indicates the C or S value used  in  the
92              corresponding Givens rotation.  LDGNUM (input) INTEGER The lead‐
93              ing dimension of arrays DIFR, POLES and GIVNUM, must be at least
94              K.
95
96       POLES  (input) DOUBLE PRECISION array, dimension ( LDGNUM, 2 )
97              On  entry,  POLES(1:K,  1)  contains  the  new  singular  values
98              obtained from solving the secular equation, and POLES(1:K, 2) is
99              an array containing the poles in the secular equation.
100
101       DIFL   (input) DOUBLE PRECISION array, dimension ( K ).
102              On  entry,  DIFL(I)  is the distance between I-th updated (unde‐
103              flated) singular value and the I-th  (undeflated)  old  singular
104              value.
105
106       DIFR   (input) DOUBLE PRECISION array, dimension ( LDGNUM, 2 ).
107              On entry, DIFR(I, 1) contains the distances between I-th updated
108              (undeflated) singular value and the I+1-th (undeflated) old sin‐
109              gular value. And DIFR(I, 2) is the normalizing factor for the I-
110              th right singular vector.
111
112       Z      (input) DOUBLE PRECISION array, dimension ( K )
113              Contain the components of the  deflation-adjusted  updating  row
114              vector.
115
116       K      (input) INTEGER
117              Contains  the  dimension of the non-deflated matrix, This is the
118              order of the related secular equation. 1 <= K <=N.
119
120       C      (input) DOUBLE PRECISION
121              C contains garbage if SQRE =0 and the C-value of a Givens  rota‐
122              tion related to the right null space if SQRE = 1.
123
124       S      (input) DOUBLE PRECISION
125              S  contains garbage if SQRE =0 and the S-value of a Givens rota‐
126              tion related to the right null space if SQRE = 1.
127
128       WORK   (workspace) DOUBLE PRECISION array, dimension ( K )
129
130       INFO   (output) INTEGER
131              = 0:  successful exit.
132              < 0:  if INFO = -i, the i-th argument had an illegal value.
133

FURTHER DETAILS

135       Based on contributions by
136          Ming Gu and Ren-Cang Li, Computer Science Division, University of
137            California at Berkeley, USA
138          Osni Marques, LBNL/NERSC, USA
139
140
141
142 LAPACK routine (version 3.2)    November 2008                       DLALS0(1)
Impressum