comparison liboctave/fCMatrix.h @ 11586:12df7854fa7c

strip trailing whitespace from source files
author John W. Eaton <jwe@octave.org>
date Thu, 20 Jan 2011 17:24:59 -0500
parents a83bad07f7e3
children 72c96de7a403
comparison
equal deleted inserted replaced
11585:1473d0cf86d2 11586:12df7854fa7c
35 class 35 class
36 OCTAVE_API 36 OCTAVE_API
37 FloatComplexMatrix : public MArray<FloatComplex> 37 FloatComplexMatrix : public MArray<FloatComplex>
38 { 38 {
39 public: 39 public:
40 40
41 typedef FloatComplexColumnVector column_vector_type; 41 typedef FloatComplexColumnVector column_vector_type;
42 typedef FloatComplexRowVector row_vector_type; 42 typedef FloatComplexRowVector row_vector_type;
43 43
44 typedef void (*solve_singularity_handler) (float rcon); 44 typedef void (*solve_singularity_handler) (float rcon);
45 45
53 : MArray<FloatComplex> (dim_vector (r, c), val) { } 53 : MArray<FloatComplex> (dim_vector (r, c), val) { }
54 54
55 FloatComplexMatrix (const dim_vector& dv) 55 FloatComplexMatrix (const dim_vector& dv)
56 : MArray<FloatComplex> (dv.redim (2)) { } 56 : MArray<FloatComplex> (dv.redim (2)) { }
57 57
58 FloatComplexMatrix (const dim_vector& dv, const FloatComplex& val) 58 FloatComplexMatrix (const dim_vector& dv, const FloatComplex& val)
59 : MArray<FloatComplex> (dv.redim (2), val) { } 59 : MArray<FloatComplex> (dv.redim (2), val) { }
60 60
61 FloatComplexMatrix (const FloatComplexMatrix& a) 61 FloatComplexMatrix (const FloatComplexMatrix& a)
62 : MArray<FloatComplex> (a) { } 62 : MArray<FloatComplex> (a) { }
63 63
170 float& rcon, int force, int calc_cond) const; 170 float& rcon, int force, int calc_cond) const;
171 171
172 public: 172 public:
173 FloatComplexMatrix inverse (void) const; 173 FloatComplexMatrix inverse (void) const;
174 FloatComplexMatrix inverse (octave_idx_type& info) const; 174 FloatComplexMatrix inverse (octave_idx_type& info) const;
175 FloatComplexMatrix inverse (octave_idx_type& info, float& rcon, int force = 0, 175 FloatComplexMatrix inverse (octave_idx_type& info, float& rcon, int force = 0,
176 int calc_cond = 1) const; 176 int calc_cond = 1) const;
177 177
178 FloatComplexMatrix inverse (MatrixType &mattype) const; 178 FloatComplexMatrix inverse (MatrixType &mattype) const;
179 FloatComplexMatrix inverse (MatrixType &mattype, octave_idx_type& info) const; 179 FloatComplexMatrix inverse (MatrixType &mattype, octave_idx_type& info) const;
180 FloatComplexMatrix inverse (MatrixType &mattype, octave_idx_type& info, 180 FloatComplexMatrix inverse (MatrixType &mattype, octave_idx_type& info,
181 float& rcon, int force = 0, 181 float& rcon, int force = 0,
182 int calc_cond = 1) const; 182 int calc_cond = 1) const;
183 183
184 FloatComplexMatrix pseudo_inverse (float tol = 0.0) const; 184 FloatComplexMatrix pseudo_inverse (float tol = 0.0) const;
185 185
186 FloatComplexMatrix fourier (void) const; 186 FloatComplexMatrix fourier (void) const;
190 FloatComplexMatrix ifourier2d (void) const; 190 FloatComplexMatrix ifourier2d (void) const;
191 191
192 FloatComplexDET determinant (void) const; 192 FloatComplexDET determinant (void) const;
193 FloatComplexDET determinant (octave_idx_type& info) const; 193 FloatComplexDET determinant (octave_idx_type& info) const;
194 FloatComplexDET determinant (octave_idx_type& info, float& rcon, int calc_cond = 1) const; 194 FloatComplexDET determinant (octave_idx_type& info, float& rcon, int calc_cond = 1) const;
195 FloatComplexDET determinant (MatrixType &mattype, octave_idx_type& info, 195 FloatComplexDET determinant (MatrixType &mattype, octave_idx_type& info,
196 float& rcon, int calc_cond = 1) const; 196 float& rcon, int calc_cond = 1) const;
197 197
198 float rcond (void) const; 198 float rcond (void) const;
199 float rcond (MatrixType &mattype) const; 199 float rcond (MatrixType &mattype) const;
200 200
201 private: 201 private:
202 // Upper triangular matrix solvers 202 // Upper triangular matrix solvers
203 FloatComplexMatrix utsolve (MatrixType &typ, const FloatComplexMatrix& b, 203 FloatComplexMatrix utsolve (MatrixType &typ, const FloatComplexMatrix& b,
204 octave_idx_type& info, float& rcon, 204 octave_idx_type& info, float& rcon,
205 solve_singularity_handler sing_handler, 205 solve_singularity_handler sing_handler,
206 bool calc_cond = false, blas_trans_type transt = blas_no_trans) const; 206 bool calc_cond = false, blas_trans_type transt = blas_no_trans) const;
207 207
208 // Lower triangular matrix solvers 208 // Lower triangular matrix solvers
209 FloatComplexMatrix ltsolve (MatrixType &typ, const FloatComplexMatrix& b, 209 FloatComplexMatrix ltsolve (MatrixType &typ, const FloatComplexMatrix& b,
210 octave_idx_type& info, float& rcon, 210 octave_idx_type& info, float& rcon,
211 solve_singularity_handler sing_handler, 211 solve_singularity_handler sing_handler,
212 bool calc_cond = false, blas_trans_type transt = blas_no_trans) const; 212 bool calc_cond = false, blas_trans_type transt = blas_no_trans) const;
213 213
214 // Full matrix solvers (umfpack/cholesky) 214 // Full matrix solvers (umfpack/cholesky)
215 FloatComplexMatrix fsolve (MatrixType &typ, const FloatComplexMatrix& b, 215 FloatComplexMatrix fsolve (MatrixType &typ, const FloatComplexMatrix& b,
216 octave_idx_type& info, float& rcon, 216 octave_idx_type& info, float& rcon,
217 solve_singularity_handler sing_handler, 217 solve_singularity_handler sing_handler,
218 bool calc_cond = false) const; 218 bool calc_cond = false) const;
219 219
220 public: 220 public:
221 // Generic interface to solver with no probing of type 221 // Generic interface to solver with no probing of type
222 FloatComplexMatrix solve (MatrixType &typ, const FloatMatrix& b) const; 222 FloatComplexMatrix solve (MatrixType &typ, const FloatMatrix& b) const;
223 FloatComplexMatrix solve (MatrixType &typ, const FloatMatrix& b, 223 FloatComplexMatrix solve (MatrixType &typ, const FloatMatrix& b,
224 octave_idx_type& info) const; 224 octave_idx_type& info) const;
225 FloatComplexMatrix solve (MatrixType &typ, const FloatMatrix& b, 225 FloatComplexMatrix solve (MatrixType &typ, const FloatMatrix& b,
226 octave_idx_type& info, float& rcon) const; 226 octave_idx_type& info, float& rcon) const;
227 FloatComplexMatrix solve (MatrixType &typ, const FloatMatrix& b, octave_idx_type& info, 227 FloatComplexMatrix solve (MatrixType &typ, const FloatMatrix& b, octave_idx_type& info,
228 float& rcon, solve_singularity_handler sing_handler, 228 float& rcon, solve_singularity_handler sing_handler,
229 bool singular_fallback = true, 229 bool singular_fallback = true,
230 blas_trans_type transt = blas_no_trans) const; 230 blas_trans_type transt = blas_no_trans) const;
231 231
232 FloatComplexMatrix solve (MatrixType &typ, const FloatComplexMatrix& b) const; 232 FloatComplexMatrix solve (MatrixType &typ, const FloatComplexMatrix& b) const;
233 FloatComplexMatrix solve (MatrixType &typ, const FloatComplexMatrix& b, 233 FloatComplexMatrix solve (MatrixType &typ, const FloatComplexMatrix& b,
234 octave_idx_type& info) const; 234 octave_idx_type& info) const;
235 FloatComplexMatrix solve (MatrixType &typ, const FloatComplexMatrix& b, 235 FloatComplexMatrix solve (MatrixType &typ, const FloatComplexMatrix& b,
236 octave_idx_type& info, float& rcon) const; 236 octave_idx_type& info, float& rcon) const;
237 FloatComplexMatrix solve (MatrixType &typ, const FloatComplexMatrix& b, 237 FloatComplexMatrix solve (MatrixType &typ, const FloatComplexMatrix& b,
238 octave_idx_type& info, float& rcon, 238 octave_idx_type& info, float& rcon,
239 solve_singularity_handler sing_handler, 239 solve_singularity_handler sing_handler,
240 bool singular_fallback = true, 240 bool singular_fallback = true,
241 blas_trans_type transt = blas_no_trans) const; 241 blas_trans_type transt = blas_no_trans) const;
242 242
243 FloatComplexColumnVector solve (MatrixType &typ, const FloatColumnVector& b) const; 243 FloatComplexColumnVector solve (MatrixType &typ, const FloatColumnVector& b) const;
244 FloatComplexColumnVector solve (MatrixType &typ, const FloatColumnVector& b, 244 FloatComplexColumnVector solve (MatrixType &typ, const FloatColumnVector& b,
245 octave_idx_type& info) const; 245 octave_idx_type& info) const;
246 FloatComplexColumnVector solve (MatrixType &typ, const FloatColumnVector& b, 246 FloatComplexColumnVector solve (MatrixType &typ, const FloatColumnVector& b,
247 octave_idx_type& info, float& rcon) const; 247 octave_idx_type& info, float& rcon) const;
248 FloatComplexColumnVector solve (MatrixType &typ, const FloatColumnVector& b, 248 FloatComplexColumnVector solve (MatrixType &typ, const FloatColumnVector& b,
249 octave_idx_type& info, float& rcon, 249 octave_idx_type& info, float& rcon,
250 solve_singularity_handler sing_handler, 250 solve_singularity_handler sing_handler,
251 blas_trans_type transt = blas_no_trans) const; 251 blas_trans_type transt = blas_no_trans) const;
252 252
253 FloatComplexColumnVector solve (MatrixType &typ, 253 FloatComplexColumnVector solve (MatrixType &typ,
254 const FloatComplexColumnVector& b) const; 254 const FloatComplexColumnVector& b) const;
255 FloatComplexColumnVector solve (MatrixType &typ, const FloatComplexColumnVector& b, 255 FloatComplexColumnVector solve (MatrixType &typ, const FloatComplexColumnVector& b,
256 octave_idx_type& info) const; 256 octave_idx_type& info) const;
257 FloatComplexColumnVector solve (MatrixType &typ, const FloatComplexColumnVector& b, 257 FloatComplexColumnVector solve (MatrixType &typ, const FloatComplexColumnVector& b,
258 octave_idx_type& info, float& rcon) const; 258 octave_idx_type& info, float& rcon) const;
259 FloatComplexColumnVector solve (MatrixType &typ, const FloatComplexColumnVector& b, 259 FloatComplexColumnVector solve (MatrixType &typ, const FloatComplexColumnVector& b,
260 octave_idx_type& info, float& rcon, 260 octave_idx_type& info, float& rcon,
261 solve_singularity_handler sing_handler, 261 solve_singularity_handler sing_handler,
262 blas_trans_type transt = blas_no_trans) const; 262 blas_trans_type transt = blas_no_trans) const;
263 263
264 // Generic interface to solver with probing of type 264 // Generic interface to solver with probing of type
265 FloatComplexMatrix solve (const FloatMatrix& b) const; 265 FloatComplexMatrix solve (const FloatMatrix& b) const;
266 FloatComplexMatrix solve (const FloatMatrix& b, octave_idx_type& info) const; 266 FloatComplexMatrix solve (const FloatMatrix& b, octave_idx_type& info) const;
267 FloatComplexMatrix solve (const FloatMatrix& b, octave_idx_type& info, float& rcon) const; 267 FloatComplexMatrix solve (const FloatMatrix& b, octave_idx_type& info, float& rcon) const;
268 FloatComplexMatrix solve (const FloatMatrix& b, octave_idx_type& info, float& rcon, 268 FloatComplexMatrix solve (const FloatMatrix& b, octave_idx_type& info, float& rcon,
269 solve_singularity_handler sing_handler, 269 solve_singularity_handler sing_handler,
270 blas_trans_type transt = blas_no_trans) const; 270 blas_trans_type transt = blas_no_trans) const;
271 271
272 FloatComplexMatrix solve (const FloatComplexMatrix& b) const; 272 FloatComplexMatrix solve (const FloatComplexMatrix& b) const;
273 FloatComplexMatrix solve (const FloatComplexMatrix& b, octave_idx_type& info) const; 273 FloatComplexMatrix solve (const FloatComplexMatrix& b, octave_idx_type& info) const;
274 FloatComplexMatrix solve (const FloatComplexMatrix& b, octave_idx_type& info, float& rcon) const; 274 FloatComplexMatrix solve (const FloatComplexMatrix& b, octave_idx_type& info, float& rcon) const;
275 FloatComplexMatrix solve (const FloatComplexMatrix& b, octave_idx_type& info, float& rcon, 275 FloatComplexMatrix solve (const FloatComplexMatrix& b, octave_idx_type& info, float& rcon,
276 solve_singularity_handler sing_handler, 276 solve_singularity_handler sing_handler,
277 blas_trans_type transt = blas_no_trans) const; 277 blas_trans_type transt = blas_no_trans) const;
278 278
279 FloatComplexColumnVector solve (const FloatColumnVector& b) const; 279 FloatComplexColumnVector solve (const FloatColumnVector& b) const;
280 FloatComplexColumnVector solve (const FloatColumnVector& b, octave_idx_type& info) const; 280 FloatComplexColumnVector solve (const FloatColumnVector& b, octave_idx_type& info) const;
281 FloatComplexColumnVector solve (const FloatColumnVector& b, octave_idx_type& info, 281 FloatComplexColumnVector solve (const FloatColumnVector& b, octave_idx_type& info,
282 float& rcon) const; 282 float& rcon) const;
283 FloatComplexColumnVector solve (const FloatColumnVector& b, octave_idx_type& info, float& rcon, 283 FloatComplexColumnVector solve (const FloatColumnVector& b, octave_idx_type& info, float& rcon,
284 solve_singularity_handler sing_handler, 284 solve_singularity_handler sing_handler,
285 blas_trans_type transt = blas_no_trans) const; 285 blas_trans_type transt = blas_no_trans) const;
286 286
287 FloatComplexColumnVector solve (const FloatComplexColumnVector& b) const; 287 FloatComplexColumnVector solve (const FloatComplexColumnVector& b) const;
288 FloatComplexColumnVector solve (const FloatComplexColumnVector& b, octave_idx_type& info) const; 288 FloatComplexColumnVector solve (const FloatComplexColumnVector& b, octave_idx_type& info) const;
289 FloatComplexColumnVector solve (const FloatComplexColumnVector& b, octave_idx_type& info, 289 FloatComplexColumnVector solve (const FloatComplexColumnVector& b, octave_idx_type& info,
290 float& rcon) const; 290 float& rcon) const;
291 FloatComplexColumnVector solve (const FloatComplexColumnVector& b, octave_idx_type& info, 291 FloatComplexColumnVector solve (const FloatComplexColumnVector& b, octave_idx_type& info,
292 float& rcon, 292 float& rcon,
293 solve_singularity_handler sing_handler, 293 solve_singularity_handler sing_handler,
294 blas_trans_type transt = blas_no_trans) const; 294 blas_trans_type transt = blas_no_trans) const;
295 295
296 FloatComplexMatrix lssolve (const FloatMatrix& b) const; 296 FloatComplexMatrix lssolve (const FloatMatrix& b) const;
297 FloatComplexMatrix lssolve (const FloatMatrix& b, octave_idx_type& info) const; 297 FloatComplexMatrix lssolve (const FloatMatrix& b, octave_idx_type& info) const;
298 FloatComplexMatrix lssolve (const FloatMatrix& b, octave_idx_type& info, 298 FloatComplexMatrix lssolve (const FloatMatrix& b, octave_idx_type& info,
299 octave_idx_type& rank) const; 299 octave_idx_type& rank) const;
300 FloatComplexMatrix lssolve (const FloatMatrix& b, octave_idx_type& info, 300 FloatComplexMatrix lssolve (const FloatMatrix& b, octave_idx_type& info,
301 octave_idx_type& rank, float& rcon) const; 301 octave_idx_type& rank, float& rcon) const;
302 302
303 FloatComplexMatrix lssolve (const FloatComplexMatrix& b) const; 303 FloatComplexMatrix lssolve (const FloatComplexMatrix& b) const;
304 FloatComplexMatrix lssolve (const FloatComplexMatrix& b, octave_idx_type& info) const; 304 FloatComplexMatrix lssolve (const FloatComplexMatrix& b, octave_idx_type& info) const;
305 FloatComplexMatrix lssolve (const FloatComplexMatrix& b, octave_idx_type& info, 305 FloatComplexMatrix lssolve (const FloatComplexMatrix& b, octave_idx_type& info,
366 bool column_is_real_only (octave_idx_type) const; 366 bool column_is_real_only (octave_idx_type) const;
367 367
368 FloatComplexColumnVector row_min (void) const; 368 FloatComplexColumnVector row_min (void) const;
369 FloatComplexColumnVector row_max (void) const; 369 FloatComplexColumnVector row_max (void) const;
370 370
371 FloatComplexColumnVector row_min (Array<octave_idx_type>& index) const; 371 FloatComplexColumnVector row_min (Array<octave_idx_type>& index) const;
372 FloatComplexColumnVector row_max (Array<octave_idx_type>& index) const; 372 FloatComplexColumnVector row_max (Array<octave_idx_type>& index) const;
373 373
374 FloatComplexRowVector column_min (void) const; 374 FloatComplexRowVector column_min (void) const;
375 FloatComplexRowVector column_max (void) const; 375 FloatComplexRowVector column_max (void) const;
376 376
403 Givens (const FloatComplex&, const FloatComplex&); 403 Givens (const FloatComplex&, const FloatComplex&);
404 404
405 extern OCTAVE_API FloatComplexMatrix 405 extern OCTAVE_API FloatComplexMatrix
406 Sylvester (const FloatComplexMatrix&, const FloatComplexMatrix&, const FloatComplexMatrix&); 406 Sylvester (const FloatComplexMatrix&, const FloatComplexMatrix&, const FloatComplexMatrix&);
407 407
408 extern OCTAVE_API FloatComplexMatrix 408 extern OCTAVE_API FloatComplexMatrix
409 xgemm (const FloatComplexMatrix& a, const FloatComplexMatrix& b, 409 xgemm (const FloatComplexMatrix& a, const FloatComplexMatrix& b,
410 blas_trans_type transa = blas_no_trans, 410 blas_trans_type transa = blas_no_trans,
411 blas_trans_type transb = blas_no_trans); 411 blas_trans_type transb = blas_no_trans);
412 412
413 extern OCTAVE_API FloatComplexMatrix operator * (const FloatMatrix&, const FloatComplexMatrix&); 413 extern OCTAVE_API FloatComplexMatrix operator * (const FloatMatrix&, const FloatComplexMatrix&);
414 extern OCTAVE_API FloatComplexMatrix operator * (const FloatComplexMatrix&, const FloatMatrix&); 414 extern OCTAVE_API FloatComplexMatrix operator * (const FloatComplexMatrix&, const FloatMatrix&);
415 extern OCTAVE_API FloatComplexMatrix operator * (const FloatComplexMatrix&, const FloatComplexMatrix&); 415 extern OCTAVE_API FloatComplexMatrix operator * (const FloatComplexMatrix&, const FloatComplexMatrix&);
420 420
421 extern OCTAVE_API FloatComplexMatrix max (const FloatComplex& c, const FloatComplexMatrix& m); 421 extern OCTAVE_API FloatComplexMatrix max (const FloatComplex& c, const FloatComplexMatrix& m);
422 extern OCTAVE_API FloatComplexMatrix max (const FloatComplexMatrix& m, const FloatComplex& c); 422 extern OCTAVE_API FloatComplexMatrix max (const FloatComplexMatrix& m, const FloatComplex& c);
423 extern OCTAVE_API FloatComplexMatrix max (const FloatComplexMatrix& a, const FloatComplexMatrix& b); 423 extern OCTAVE_API FloatComplexMatrix max (const FloatComplexMatrix& a, const FloatComplexMatrix& b);
424 424
425 extern OCTAVE_API FloatComplexMatrix linspace (const FloatComplexColumnVector& x1, 425 extern OCTAVE_API FloatComplexMatrix linspace (const FloatComplexColumnVector& x1,
426 const FloatComplexColumnVector& x2, 426 const FloatComplexColumnVector& x2,
427 octave_idx_type n); 427 octave_idx_type n);
428 428
429 MS_CMP_OP_DECLS (FloatComplexMatrix, FloatComplex, OCTAVE_API) 429 MS_CMP_OP_DECLS (FloatComplexMatrix, FloatComplex, OCTAVE_API)
430 MS_BOOL_OP_DECLS (FloatComplexMatrix, FloatComplex, OCTAVE_API) 430 MS_BOOL_OP_DECLS (FloatComplexMatrix, FloatComplex, OCTAVE_API)
431 431