diff liboctave/CNDArray.cc @ 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 24abf5a702d9
line wrap: on
line diff
--- a/liboctave/CNDArray.cc	Wed Feb 20 01:09:19 2008 -0500
+++ b/liboctave/CNDArray.cc	Wed Feb 20 04:22:50 2008 -0500
@@ -33,6 +33,7 @@
 #include "CNDArray.h"
 #include "mx-base.h"
 #include "f77-fcn.h"
+#include "functor.h"
 #include "lo-ieee.h"
 #include "lo-mappers.h"
 
@@ -984,6 +985,23 @@
   return ::compute_index (ra_idx, dimensions);
 }
 
+NDArray
+ComplexNDArray::map (dmapper fcn) const
+{
+  return MArrayN<Complex>::map<double> (func_ptr (fcn));
+}
+
+ComplexNDArray
+ComplexNDArray::map (cmapper fcn) const
+{
+  return MArrayN<Complex>::map<Complex> (func_ptr (fcn));
+}
+
+boolNDArray
+ComplexNDArray::map (bmapper fcn) const
+{
+  return MArrayN<Complex>::map<bool> (func_ptr (fcn));
+}
 
 // This contains no information on the array structure !!!
 std::ostream&