diff liboctave/CNDArray.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 36594d5bbe13
line wrap: on
line diff
--- a/liboctave/CNDArray.h	Wed Feb 20 01:09:19 2008 -0500
+++ b/liboctave/CNDArray.h	Wed Feb 20 04:22:50 2008 -0500
@@ -116,6 +116,14 @@
   //  bool all_elements_are_real (void) const;
   //  bool all_integers (double& max_val, double& min_val) const;
 
+  typedef double (*dmapper) (const Complex&);
+  typedef Complex (*cmapper) (const Complex&);
+  typedef bool (*bmapper) (const Complex&);
+
+  NDArray map (dmapper fcn) const;
+  ComplexNDArray map (cmapper fcn) const;
+  boolNDArray map (bmapper fcn) const;
+
 private:
 
   ComplexNDArray (Complex *d, const dim_vector& dv)