diff liboctave/fNDArray.cc @ 8998:a48fba01e4ac

optimize isnan/isinf/isfinite mappers
author Jaroslav Hajek <highegg@gmail.com>
date Thu, 19 Mar 2009 17:46:38 +0100
parents ed5055b0a476
children dc07bc4157b8
line wrap: on
line diff
--- a/liboctave/fNDArray.cc
+++ b/liboctave/fNDArray.cc
@@ -829,6 +829,24 @@
                        dims ());
 }
 
+boolNDArray
+FloatNDArray::isnan (void) const
+{
+  return ArrayN<bool> (fastmap<bool> (xisnan));
+}
+
+boolNDArray
+FloatNDArray::isinf (void) const
+{
+  return ArrayN<bool> (fastmap<bool> (xisinf));
+}
+
+boolNDArray
+FloatNDArray::isfinite (void) const
+{
+  return ArrayN<bool> (fastmap<bool> (xfinite));
+}
+
 FloatMatrix
 FloatNDArray::matrix_value (void) const
 {