comparison liboctave/fMatrix.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 6dfebfa334cb
comparison
equal deleted inserted replaced
11585:1473d0cf86d2 11586:12df7854fa7c
131 { 131 {
132 MArray<float>::resize (dim_vector (nr, nc), rfv); 132 MArray<float>::resize (dim_vector (nr, nc), rfv);
133 } 133 }
134 134
135 private: 135 private:
136 FloatMatrix tinverse (MatrixType &mattype, octave_idx_type& info, float& rcon, 136 FloatMatrix tinverse (MatrixType &mattype, octave_idx_type& info, float& rcon,
137 int force, int calc_cond) const; 137 int force, int calc_cond) const;
138 138
139 FloatMatrix finverse (MatrixType &mattype, octave_idx_type& info, float& rcon, 139 FloatMatrix finverse (MatrixType &mattype, octave_idx_type& info, float& rcon,
140 int force, int calc_cond) const; 140 int force, int calc_cond) const;
141 141
142 public: 142 public:
143 FloatMatrix inverse (void) const; 143 FloatMatrix inverse (void) const;
144 FloatMatrix inverse (octave_idx_type& info) const; 144 FloatMatrix inverse (octave_idx_type& info) const;
159 FloatComplexMatrix ifourier2d (void) const; 159 FloatComplexMatrix ifourier2d (void) const;
160 160
161 FloatDET determinant (void) const; 161 FloatDET determinant (void) const;
162 FloatDET determinant (octave_idx_type& info) const; 162 FloatDET determinant (octave_idx_type& info) const;
163 FloatDET determinant (octave_idx_type& info, float& rcon, int calc_cond = 1) const; 163 FloatDET determinant (octave_idx_type& info, float& rcon, int calc_cond = 1) const;
164 FloatDET determinant (MatrixType &mattype, octave_idx_type& info, 164 FloatDET determinant (MatrixType &mattype, octave_idx_type& info,
165 float& rcon, int calc_cond = 1) const; 165 float& rcon, int calc_cond = 1) const;
166 166
167 float rcond (void) const; 167 float rcond (void) const;
168 float rcond (MatrixType &mattype) const; 168 float rcond (MatrixType &mattype) const;
169 169
185 185
186 public: 186 public:
187 // Generic interface to solver with no probing of type 187 // Generic interface to solver with no probing of type
188 FloatMatrix solve (MatrixType &typ, const FloatMatrix& b) const; 188 FloatMatrix solve (MatrixType &typ, const FloatMatrix& b) const;
189 FloatMatrix solve (MatrixType &typ, const FloatMatrix& b, octave_idx_type& info) const; 189 FloatMatrix solve (MatrixType &typ, const FloatMatrix& b, octave_idx_type& info) const;
190 FloatMatrix solve (MatrixType &typ, const FloatMatrix& b, octave_idx_type& info, 190 FloatMatrix solve (MatrixType &typ, const FloatMatrix& b, octave_idx_type& info,
191 float& rcon) const; 191 float& rcon) const;
192 FloatMatrix solve (MatrixType &typ, const FloatMatrix& b, octave_idx_type& info, 192 FloatMatrix solve (MatrixType &typ, const FloatMatrix& b, octave_idx_type& info,
193 float& rcon, solve_singularity_handler sing_handler, 193 float& rcon, solve_singularity_handler sing_handler,
194 bool singular_fallback = true, blas_trans_type transt = blas_no_trans) const; 194 bool singular_fallback = true, blas_trans_type transt = blas_no_trans) const;
195 195
196 FloatComplexMatrix solve (MatrixType &typ, const FloatComplexMatrix& b) const; 196 FloatComplexMatrix solve (MatrixType &typ, const FloatComplexMatrix& b) const;
197 FloatComplexMatrix solve (MatrixType &typ, const FloatComplexMatrix& b, 197 FloatComplexMatrix solve (MatrixType &typ, const FloatComplexMatrix& b,
198 octave_idx_type& info) const; 198 octave_idx_type& info) const;
199 FloatComplexMatrix solve (MatrixType &typ, const FloatComplexMatrix& b, 199 FloatComplexMatrix solve (MatrixType &typ, const FloatComplexMatrix& b,
200 octave_idx_type& info, float& rcon) const; 200 octave_idx_type& info, float& rcon) const;
201 FloatComplexMatrix solve (MatrixType &typ, const FloatComplexMatrix& b, 201 FloatComplexMatrix solve (MatrixType &typ, const FloatComplexMatrix& b,
202 octave_idx_type& info, float& rcon, 202 octave_idx_type& info, float& rcon,
203 solve_singularity_handler sing_handler, 203 solve_singularity_handler sing_handler,
204 bool singular_fallback = true, 204 bool singular_fallback = true,
205 blas_trans_type transt = blas_no_trans) const; 205 blas_trans_type transt = blas_no_trans) const;
206 206
207 FloatColumnVector solve (MatrixType &typ, const FloatColumnVector& b) const; 207 FloatColumnVector solve (MatrixType &typ, const FloatColumnVector& b) const;
208 FloatColumnVector solve (MatrixType &typ, const FloatColumnVector& b, 208 FloatColumnVector solve (MatrixType &typ, const FloatColumnVector& b,
209 octave_idx_type& info) const; 209 octave_idx_type& info) const;
210 FloatColumnVector solve (MatrixType &typ, const FloatColumnVector& b, 210 FloatColumnVector solve (MatrixType &typ, const FloatColumnVector& b,
211 octave_idx_type& info, float& rcon) const; 211 octave_idx_type& info, float& rcon) const;
212 FloatColumnVector solve (MatrixType &typ, const FloatColumnVector& b, 212 FloatColumnVector solve (MatrixType &typ, const FloatColumnVector& b,
213 octave_idx_type& info, float& rcon, 213 octave_idx_type& info, float& rcon,
214 solve_singularity_handler sing_handler, 214 solve_singularity_handler sing_handler,
215 blas_trans_type transt = blas_no_trans) const; 215 blas_trans_type transt = blas_no_trans) const;
216 216
217 FloatComplexColumnVector solve (MatrixType &typ, 217 FloatComplexColumnVector solve (MatrixType &typ,
218 const FloatComplexColumnVector& b) const; 218 const FloatComplexColumnVector& b) const;
219 FloatComplexColumnVector solve (MatrixType &typ, const FloatComplexColumnVector& b, 219 FloatComplexColumnVector solve (MatrixType &typ, const FloatComplexColumnVector& b,
220 octave_idx_type& info) const; 220 octave_idx_type& info) const;
221 FloatComplexColumnVector solve (MatrixType &typ, const FloatComplexColumnVector& b, 221 FloatComplexColumnVector solve (MatrixType &typ, const FloatComplexColumnVector& b,
222 octave_idx_type& info, float& rcon) const; 222 octave_idx_type& info, float& rcon) const;
223 FloatComplexColumnVector solve (MatrixType &typ, const FloatComplexColumnVector& b, 223 FloatComplexColumnVector solve (MatrixType &typ, const FloatComplexColumnVector& b,
224 octave_idx_type& info, float& rcon, 224 octave_idx_type& info, float& rcon,
225 solve_singularity_handler sing_handler, blas_trans_type transt = blas_no_trans) const; 225 solve_singularity_handler sing_handler, blas_trans_type transt = blas_no_trans) const;
226 226
227 // Generic interface to solver with probing of type 227 // Generic interface to solver with probing of type
228 FloatMatrix solve (const FloatMatrix& b) const; 228 FloatMatrix solve (const FloatMatrix& b) const;
229 FloatMatrix solve (const FloatMatrix& b, octave_idx_type& info) const; 229 FloatMatrix solve (const FloatMatrix& b, octave_idx_type& info) const;
230 FloatMatrix solve (const FloatMatrix& b, octave_idx_type& info, float& rcon) const; 230 FloatMatrix solve (const FloatMatrix& b, octave_idx_type& info, float& rcon) const;
231 FloatMatrix solve (const FloatMatrix& b, octave_idx_type& info, float& rcon, 231 FloatMatrix solve (const FloatMatrix& b, octave_idx_type& info, float& rcon,
232 solve_singularity_handler sing_handler, 232 solve_singularity_handler sing_handler,
233 blas_trans_type transt = blas_no_trans) const; 233 blas_trans_type transt = blas_no_trans) const;
234 234
235 FloatComplexMatrix solve (const FloatComplexMatrix& b) const; 235 FloatComplexMatrix solve (const FloatComplexMatrix& b) const;
236 FloatComplexMatrix solve (const FloatComplexMatrix& b, octave_idx_type& info) const; 236 FloatComplexMatrix solve (const FloatComplexMatrix& b, octave_idx_type& info) const;
237 FloatComplexMatrix solve (const FloatComplexMatrix& b, octave_idx_type& info, float& rcon) const; 237 FloatComplexMatrix solve (const FloatComplexMatrix& b, octave_idx_type& info, float& rcon) const;
238 FloatComplexMatrix solve (const FloatComplexMatrix& b, octave_idx_type& info, float& rcon, 238 FloatComplexMatrix solve (const FloatComplexMatrix& b, octave_idx_type& info, float& rcon,
239 solve_singularity_handler sing_handler, 239 solve_singularity_handler sing_handler,
240 blas_trans_type transt = blas_no_trans) const; 240 blas_trans_type transt = blas_no_trans) const;
241 241
242 FloatColumnVector solve (const FloatColumnVector& b) const; 242 FloatColumnVector solve (const FloatColumnVector& b) const;
243 FloatColumnVector solve (const FloatColumnVector& b, octave_idx_type& info) const; 243 FloatColumnVector solve (const FloatColumnVector& b, octave_idx_type& info) const;
244 FloatColumnVector solve (const FloatColumnVector& b, octave_idx_type& info, float& rcon) const; 244 FloatColumnVector solve (const FloatColumnVector& b, octave_idx_type& info, float& rcon) const;
245 FloatColumnVector solve (const FloatColumnVector& b, octave_idx_type& info, float& rcon, 245 FloatColumnVector solve (const FloatColumnVector& b, octave_idx_type& info, float& rcon,
246 solve_singularity_handler sing_handler, 246 solve_singularity_handler sing_handler,
247 blas_trans_type transt = blas_no_trans) const; 247 blas_trans_type transt = blas_no_trans) const;
248 248
249 FloatComplexColumnVector solve (const FloatComplexColumnVector& b) const; 249 FloatComplexColumnVector solve (const FloatComplexColumnVector& b) const;
250 FloatComplexColumnVector solve (const FloatComplexColumnVector& b, octave_idx_type& info) const; 250 FloatComplexColumnVector solve (const FloatComplexColumnVector& b, octave_idx_type& info) const;
251 FloatComplexColumnVector solve (const FloatComplexColumnVector& b, octave_idx_type& info, 251 FloatComplexColumnVector solve (const FloatComplexColumnVector& b, octave_idx_type& info,
252 float& rcon) const; 252 float& rcon) const;
253 FloatComplexColumnVector solve (const FloatComplexColumnVector& b, octave_idx_type& info, 253 FloatComplexColumnVector solve (const FloatComplexColumnVector& b, octave_idx_type& info,
254 float& rcon, solve_singularity_handler sing_handler, 254 float& rcon, solve_singularity_handler sing_handler,
255 blas_trans_type transt = blas_no_trans) const; 255 blas_trans_type transt = blas_no_trans) const;
256 256
257 // Singular solvers 257 // Singular solvers
258 FloatMatrix lssolve (const FloatMatrix& b) const; 258 FloatMatrix lssolve (const FloatMatrix& b) const;
259 FloatMatrix lssolve (const FloatMatrix& b, octave_idx_type& info) const; 259 FloatMatrix lssolve (const FloatMatrix& b, octave_idx_type& info) const;
260 FloatMatrix lssolve (const FloatMatrix& b, octave_idx_type& info, 260 FloatMatrix lssolve (const FloatMatrix& b, octave_idx_type& info,
261 octave_idx_type& rank) const; 261 octave_idx_type& rank) const;
262 FloatMatrix lssolve (const FloatMatrix& b, octave_idx_type& info, 262 FloatMatrix lssolve (const FloatMatrix& b, octave_idx_type& info,
263 octave_idx_type& rank, float& rcon) const; 263 octave_idx_type& rank, float& rcon) const;
264 264
265 FloatComplexMatrix lssolve (const FloatComplexMatrix& b) const; 265 FloatComplexMatrix lssolve (const FloatComplexMatrix& b) const;
266 FloatComplexMatrix lssolve (const FloatComplexMatrix& b, octave_idx_type& info) const; 266 FloatComplexMatrix lssolve (const FloatComplexMatrix& b, octave_idx_type& info) const;
267 FloatComplexMatrix lssolve (const FloatComplexMatrix& b, octave_idx_type& info, 267 FloatComplexMatrix lssolve (const FloatComplexMatrix& b, octave_idx_type& info,
275 octave_idx_type& rank) const; 275 octave_idx_type& rank) const;
276 FloatColumnVector lssolve (const FloatColumnVector& b, octave_idx_type& info, 276 FloatColumnVector lssolve (const FloatColumnVector& b, octave_idx_type& info,
277 octave_idx_type& rank, float& rcon) const; 277 octave_idx_type& rank, float& rcon) const;
278 278
279 FloatComplexColumnVector lssolve (const FloatComplexColumnVector& b) const; 279 FloatComplexColumnVector lssolve (const FloatComplexColumnVector& b) const;
280 FloatComplexColumnVector lssolve (const FloatComplexColumnVector& b, 280 FloatComplexColumnVector lssolve (const FloatComplexColumnVector& b,
281 octave_idx_type& info) const; 281 octave_idx_type& info) const;
282 FloatComplexColumnVector lssolve (const FloatComplexColumnVector& b, 282 FloatComplexColumnVector lssolve (const FloatComplexColumnVector& b,
283 octave_idx_type& info, 283 octave_idx_type& info,
284 octave_idx_type& rank) const; 284 octave_idx_type& rank) const;
285 FloatComplexColumnVector lssolve (const FloatComplexColumnVector& b, 285 FloatComplexColumnVector lssolve (const FloatComplexColumnVector& b,
286 octave_idx_type& info, 286 octave_idx_type& info,
287 octave_idx_type& rank, float& rcon) const; 287 octave_idx_type& rank, float& rcon) const;
288 288
289 FloatMatrix& operator += (const FloatDiagMatrix& a); 289 FloatMatrix& operator += (const FloatDiagMatrix& a);
290 FloatMatrix& operator -= (const FloatDiagMatrix& a); 290 FloatMatrix& operator -= (const FloatDiagMatrix& a);
300 bool any_element_is_inf_or_nan (void) const; 300 bool any_element_is_inf_or_nan (void) const;
301 bool any_element_not_one_or_zero (void) const; 301 bool any_element_not_one_or_zero (void) const;
302 bool all_elements_are_int_or_inf_or_nan (void) const; 302 bool all_elements_are_int_or_inf_or_nan (void) const;
303 bool all_integers (float& max_val, float& min_val) const; 303 bool all_integers (float& max_val, float& min_val) const;
304 bool too_large_for_float (void) const; 304 bool too_large_for_float (void) const;
305 305
306 boolMatrix all (int dim = -1) const; 306 boolMatrix all (int dim = -1) const;
307 boolMatrix any (int dim = -1) const; 307 boolMatrix any (int dim = -1) const;
308 308
309 FloatMatrix cumprod (int dim = -1) const; 309 FloatMatrix cumprod (int dim = -1) const;
310 FloatMatrix cumsum (int dim = -1) const; 310 FloatMatrix cumsum (int dim = -1) const;
350 extern OCTAVE_API FloatMatrix Givens (float, float); 350 extern OCTAVE_API FloatMatrix Givens (float, float);
351 351
352 extern OCTAVE_API FloatMatrix Sylvester (const FloatMatrix&, const FloatMatrix&, const FloatMatrix&); 352 extern OCTAVE_API FloatMatrix Sylvester (const FloatMatrix&, const FloatMatrix&, const FloatMatrix&);
353 353
354 extern OCTAVE_API FloatMatrix xgemm (const FloatMatrix& a, const FloatMatrix& b, 354 extern OCTAVE_API FloatMatrix xgemm (const FloatMatrix& a, const FloatMatrix& b,
355 blas_trans_type transa = blas_no_trans, 355 blas_trans_type transa = blas_no_trans,
356 blas_trans_type transb = blas_no_trans); 356 blas_trans_type transb = blas_no_trans);
357 357
358 extern OCTAVE_API FloatMatrix operator * (const FloatMatrix& a, const FloatMatrix& b); 358 extern OCTAVE_API FloatMatrix operator * (const FloatMatrix& a, const FloatMatrix& b);
359 359
360 extern OCTAVE_API FloatMatrix min (float d, const FloatMatrix& m); 360 extern OCTAVE_API FloatMatrix min (float d, const FloatMatrix& m);
363 363
364 extern OCTAVE_API FloatMatrix max (float d, const FloatMatrix& m); 364 extern OCTAVE_API FloatMatrix max (float d, const FloatMatrix& m);
365 extern OCTAVE_API FloatMatrix max (const FloatMatrix& m, float d); 365 extern OCTAVE_API FloatMatrix max (const FloatMatrix& m, float d);
366 extern OCTAVE_API FloatMatrix max (const FloatMatrix& a, const FloatMatrix& b); 366 extern OCTAVE_API FloatMatrix max (const FloatMatrix& a, const FloatMatrix& b);
367 367
368 extern OCTAVE_API FloatMatrix linspace (const FloatColumnVector& x1, 368 extern OCTAVE_API FloatMatrix linspace (const FloatColumnVector& x1,
369 const FloatColumnVector& x2, 369 const FloatColumnVector& x2,
370 octave_idx_type n); 370 octave_idx_type n);
371 371
372 372
373 MS_CMP_OP_DECLS (FloatMatrix, float, OCTAVE_API) 373 MS_CMP_OP_DECLS (FloatMatrix, float, OCTAVE_API)
374 MS_BOOL_OP_DECLS (FloatMatrix, float, OCTAVE_API) 374 MS_BOOL_OP_DECLS (FloatMatrix, float, OCTAVE_API)