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

NAME

6       ZLALS0 - 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 ZLALS0( ICOMPQ, NL, NR, SQRE, NRHS, B, LDB, BX, LDBX,  PERM,
13                          GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM, POLES, DIFL,
14                          DIFR, Z, K, C, S, RWORK, 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  DIFL(  *  ),  DIFR(  LDGNUM, * ), GIVNUM(
24                          LDGNUM, * ), POLES( LDGNUM, * ), RWORK( * ), Z( * )
25
26           COMPLEX*16     B( LDB, * ), BX( LDBX, * )
27

PURPOSE

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

ARGUMENTS

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

FURTHER DETAILS

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