~mmach/netext73/lapack

« back to all changes in this revision

Viewing changes to SRC/cgesvj.f

  • Committer: mmach
  • Date: 2019-11-24 13:54:54 UTC
  • Revision ID: netbit73@gmail.com-20191124135454-h2kzt23dekf5ib5q
3.9.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
*>          Specifies whether to compute the right singular vectors, that
90
90
*>          is, the matrix V:
91
91
*>          = 'V' or 'J': the matrix V is computed and returned in the array V
92
 
*>          = 'A' : the Jacobi rotations are applied to the MV-by-N
 
92
*>          = 'A':  the Jacobi rotations are applied to the MV-by-N
93
93
*>                  array V. In other words, the right singular vector
94
94
*>                  matrix V is not computed explicitly; instead it is
95
95
*>                  applied to an MV-by-N matrix initially stored in the
96
96
*>                  first MV rows of V.
97
 
*>          = 'N' : the matrix V is not computed and the array V is not
 
97
*>          = 'N':  the matrix V is not computed and the array V is not
98
98
*>                  referenced
99
99
*> \endverbatim
100
100
*>
116
116
*>          A is COMPLEX array, dimension (LDA,N)
117
117
*>          On entry, the M-by-N matrix A.
118
118
*>          On exit,
119
 
*>          If JOBU .EQ. 'U' .OR. JOBU .EQ. 'C':
120
 
*>                 If INFO .EQ. 0 :
 
119
*>          If JOBU = 'U' .OR. JOBU = 'C':
 
120
*>                 If INFO = 0 :
121
121
*>                 RANKA orthonormal columns of U are returned in the
122
122
*>                 leading RANKA columns of the array A. Here RANKA <= N
123
123
*>                 is the number of computed singular values of A that are
127
127
*>                 in the array RWORK as RANKA=NINT(RWORK(2)). Also see the
128
128
*>                 descriptions of SVA and RWORK. The computed columns of U
129
129
*>                 are mutually numerically orthogonal up to approximately
130
 
*>                 TOL=SQRT(M)*EPS (default); or TOL=CTOL*EPS (JOBU.EQ.'C'),
 
130
*>                 TOL=SQRT(M)*EPS (default); or TOL=CTOL*EPS (JOBU = 'C'),
131
131
*>                 see the description of JOBU.
132
 
*>                 If INFO .GT. 0,
 
132
*>                 If INFO > 0,
133
133
*>                 the procedure CGESVJ did not converge in the given number
134
134
*>                 of iterations (sweeps). In that case, the computed
135
135
*>                 columns of U may not be orthogonal up to TOL. The output
137
137
*>                 values in SVA(1:N)) and V is still a decomposition of the
138
138
*>                 input matrix A in the sense that the residual
139
139
*>                 || A - SCALE * U * SIGMA * V^* ||_2 / ||A||_2 is small.
140
 
*>          If JOBU .EQ. 'N':
141
 
*>                 If INFO .EQ. 0 :
 
140
*>          If JOBU = 'N':
 
141
*>                 If INFO = 0 :
142
142
*>                 Note that the left singular vectors are 'for free' in the
143
143
*>                 one-sided Jacobi SVD algorithm. However, if only the
144
144
*>                 singular values are needed, the level of numerical
147
147
*>                 numerically orthogonal up to approximately M*EPS. Thus,
148
148
*>                 on exit, A contains the columns of U scaled with the
149
149
*>                 corresponding singular values.
150
 
*>                 If INFO .GT. 0 :
 
150
*>                 If INFO > 0 :
151
151
*>                 the procedure CGESVJ did not converge in the given number
152
152
*>                 of iterations (sweeps).
153
153
*> \endverbatim
162
162
*> \verbatim
163
163
*>          SVA is REAL array, dimension (N)
164
164
*>          On exit,
165
 
*>          If INFO .EQ. 0 :
 
165
*>          If INFO = 0 :
166
166
*>          depending on the value SCALE = RWORK(1), we have:
167
 
*>                 If SCALE .EQ. ONE:
 
167
*>                 If SCALE = ONE:
168
168
*>                 SVA(1:N) contains the computed singular values of A.
169
169
*>                 During the computation SVA contains the Euclidean column
170
170
*>                 norms of the iterated matrices in the array A.
173
173
*>                 factored representation is due to the fact that some of the
174
174
*>                 singular values of A might underflow or overflow.
175
175
*>
176
 
*>          If INFO .GT. 0 :
 
176
*>          If INFO > 0 :
177
177
*>          the procedure CGESVJ did not converge in the given number of
178
178
*>          iterations (sweeps) and SCALE*SVA(1:N) may not be accurate.
179
179
*> \endverbatim
181
181
*> \param[in] MV
182
182
*> \verbatim
183
183
*>          MV is INTEGER
184
 
*>          If JOBV .EQ. 'A', then the product of Jacobi rotations in CGESVJ
 
184
*>          If JOBV = 'A', then the product of Jacobi rotations in CGESVJ
185
185
*>          is applied to the first MV rows of V. See the description of JOBV.
186
186
*> \endverbatim
187
187
*>
199
199
*> \param[in] LDV
200
200
*> \verbatim
201
201
*>          LDV is INTEGER
202
 
*>          The leading dimension of the array V, LDV .GE. 1.
203
 
*>          If JOBV .EQ. 'V', then LDV .GE. max(1,N).
204
 
*>          If JOBV .EQ. 'A', then LDV .GE. max(1,MV) .
 
202
*>          The leading dimension of the array V, LDV >= 1.
 
203
*>          If JOBV = 'V', then LDV >= max(1,N).
 
204
*>          If JOBV = 'A', then LDV >= max(1,MV) .
205
205
*> \endverbatim
206
206
*>
207
207
*> \param[in,out] CWORK
208
208
*> \verbatim
209
209
*>          CWORK is COMPLEX array, dimension (max(1,LWORK))
210
210
*>          Used as workspace.
211
 
*>          If on entry LWORK .EQ. -1, then a workspace query is assumed and
 
211
*>          If on entry LWORK = -1, then a workspace query is assumed and
212
212
*>          no computation is done; CWORK(1) is set to the minial (and optimal)
213
213
*>          length of CWORK.
214
214
*> \endverbatim
223
223
*> \verbatim
224
224
*>          RWORK is REAL array, dimension (max(6,LRWORK))
225
225
*>          On entry,
226
 
*>          If JOBU .EQ. 'C' :
 
226
*>          If JOBU = 'C' :
227
227
*>          RWORK(1) = CTOL, where CTOL defines the threshold for convergence.
228
228
*>                    The process stops if all columns of A are mutually
229
229
*>                    orthogonal up to CTOL*EPS, EPS=SLAMCH('E').
243
243
*>          RWORK(5) = max_{i.NE.j} |COS(A(:,i),A(:,j))| in the last sweep.
244
244
*>                    This is useful information in cases when CGESVJ did
245
245
*>                    not converge, as it can be used to estimate whether
246
 
*>                    the output is stil useful and for post festum analysis.
 
246
*>                    the output is still useful and for post festum analysis.
247
247
*>          RWORK(6) = the largest absolute value over all sines of the
248
248
*>                    Jacobi rotation angles in the last sweep. It can be
249
249
*>                    useful for a post festum analysis.
250
 
*>         If on entry LRWORK .EQ. -1, then a workspace query is assumed and
 
250
*>         If on entry LRWORK = -1, then a workspace query is assumed and
251
251
*>         no computation is done; RWORK(1) is set to the minial (and optimal)
252
252
*>         length of RWORK.
253
253
*> \endverbatim
261
261
*> \param[out] INFO
262
262
*> \verbatim
263
263
*>          INFO is INTEGER
264
 
*>          = 0 : successful exit.
265
 
*>          < 0 : if INFO = -i, then the i-th argument had an illegal value
266
 
*>          > 0 : CGESVJ did not converge in the maximal allowed number
 
264
*>          = 0:  successful exit.
 
265
*>          < 0:  if INFO = -i, then the i-th argument had an illegal value
 
266
*>          > 0:  CGESVJ did not converge in the maximal allowed number
267
267
*>                (NSWEEP=30) of sweeps. The output may still be useful.
268
268
*>                See the description of RWORK.
269
269
*> \endverbatim