comparison liboctave/dSparse.h @ 7503:8c32f95c2639

convert mapper functions to new format
author David Bateman <dbateman@free.fr>
date Wed, 20 Feb 2008 04:22:50 -0500
parents a1dbe9d80eee
children 1a446f28ce68
comparison
equal deleted inserted replaced
7502:2ce6b4258e96 7503:8c32f95c2639
368 ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info, 368 ComplexColumnVector solve (const ComplexColumnVector& b, octave_idx_type& info,
369 double& rcond, 369 double& rcond,
370 solve_singularity_handler sing_handler) const; 370 solve_singularity_handler sing_handler) const;
371 371
372 // other operations 372 // other operations
373 SparseMatrix map (d_d_Mapper f) const;
374 SparseBoolMatrix map (b_d_Mapper f) const;
375
376 SparseMatrix& apply (d_d_Mapper f);
377 373
378 bool any_element_is_negative (bool = false) const; 374 bool any_element_is_negative (bool = false) const;
379 bool any_element_is_inf_or_nan (void) const; 375 bool any_element_is_inf_or_nan (void) const;
380 bool all_elements_are_zero (void) const; 376 bool all_elements_are_zero (void) const;
381 bool all_elements_are_int_or_inf_or_nan (void) const; 377 bool all_elements_are_int_or_inf_or_nan (void) const;
414 410
415 // i/o 411 // i/o
416 412
417 friend OCTAVE_API std::ostream& operator << (std::ostream& os, const SparseMatrix& a); 413 friend OCTAVE_API std::ostream& operator << (std::ostream& os, const SparseMatrix& a);
418 friend OCTAVE_API std::istream& operator >> (std::istream& is, SparseMatrix& a); 414 friend OCTAVE_API std::istream& operator >> (std::istream& is, SparseMatrix& a);
415
416 typedef double (*dmapper) (double);
417 typedef Complex (*cmapper) (const Complex&);
418 typedef bool (*bmapper) (double);
419 SparseMatrix map (dmapper fcn) const;
420 SparseComplexMatrix map (cmapper fcn) const;
421 SparseBoolMatrix map (bmapper fcn) const;
419 }; 422 };
420 423
421 // Publish externally used friend functions. 424 // Publish externally used friend functions.
422 425
423 extern OCTAVE_API SparseMatrix real (const SparseComplexMatrix& a); 426 extern OCTAVE_API SparseMatrix real (const SparseComplexMatrix& a);