comparison liboctave/CSparse.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
400 SparseComplexMatrix permute (const Array<octave_idx_type>& vec, 400 SparseComplexMatrix permute (const Array<octave_idx_type>& vec,
401 bool inv = false) const; 401 bool inv = false) const;
402 402
403 SparseComplexMatrix ipermute (const Array<octave_idx_type>& vec) const; 403 SparseComplexMatrix ipermute (const Array<octave_idx_type>& vec) const;
404 404
405 SparseComplexMatrix map (c_c_Mapper f) const;
406 SparseMatrix map (d_c_Mapper f) const;
407 SparseBoolMatrix map (b_c_Mapper f) const;
408
409 SparseComplexMatrix& apply (c_c_Mapper f);
410
411 bool any_element_is_inf_or_nan (void) const; 405 bool any_element_is_inf_or_nan (void) const;
412 bool all_elements_are_real (void) const; 406 bool all_elements_are_real (void) const;
413 bool all_integers (double& max_val, double& min_val) const; 407 bool all_integers (double& max_val, double& min_val) const;
414 bool too_large_for_float (void) const; 408 bool too_large_for_float (void) const;
415 409
430 // i/o 424 // i/o
431 friend OCTAVE_API std::ostream& operator << (std::ostream& os, 425 friend OCTAVE_API std::ostream& operator << (std::ostream& os,
432 const SparseComplexMatrix& a); 426 const SparseComplexMatrix& a);
433 friend OCTAVE_API std::istream& operator >> (std::istream& is, 427 friend OCTAVE_API std::istream& operator >> (std::istream& is,
434 SparseComplexMatrix& a); 428 SparseComplexMatrix& a);
429
430 typedef double (*dmapper) (const Complex&);
431 typedef Complex (*cmapper) (const Complex&);
432 typedef bool (*bmapper) (const Complex&);
433 SparseMatrix map (dmapper fcn) const;
434 SparseComplexMatrix map (cmapper fcn) const;
435 SparseBoolMatrix map (bmapper fcn) const;
435 }; 436 };
436 437
437 extern OCTAVE_API SparseComplexMatrix operator * (const SparseMatrix&, 438 extern OCTAVE_API SparseComplexMatrix operator * (const SparseMatrix&,
438 const SparseComplexMatrix&); 439 const SparseComplexMatrix&);
439 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&, 440 extern OCTAVE_API SparseComplexMatrix operator * (const SparseComplexMatrix&,