diff liboctave/array/dNDArray.cc @ 21782:2aef506f3fec

use namespace for lo-mappers.h functions * lo-mappers.h, lo-mappers.cc (acos, arg, asin, atan, ceil, conj, copysign, exp2, finite, fix, floor, imag, is_NA, is_NaN_or_NA, isinf, isinteger, isnan, log2, max, min, mod, negative_sign, nint, nint_big, positive_sign, rc_acos, rc_acosh, rc_asin, rc_atanh, rc_log, rc_log10, rc_log2, rc_sqrt, real, rem, round, roundb, signbit, signum, trunc, x_nint): Define in octave::math namespace. Deprecate old names. Change all uses. * oct-inttypes.h: Put round and isnan functions in octave::math namespace and rename from xround and xisnan. Change all uses.
author John W. Eaton <jwe@octave.org>
date Wed, 25 May 2016 16:51:16 -0400
parents aba2e6293dd8
children 59cadee1c74b
line wrap: on
line diff
--- a/liboctave/array/dNDArray.cc	Fri May 27 10:20:48 2016 -0400
+++ b/liboctave/array/dNDArray.cc	Wed May 25 16:51:16 2016 -0400
@@ -549,14 +549,14 @@
 bool
 NDArray::any_element_is_negative (bool neg_zero) const
 {
-  return (neg_zero ? test_all (xnegative_sign)
+  return (neg_zero ? test_all (octave::math::negative_sign)
           : do_mx_check<double> (*this, mx_inline_any_negative));
 }
 
 bool
 NDArray::any_element_is_positive (bool neg_zero) const
 {
-  return (neg_zero ? test_all (xpositive_sign)
+  return (neg_zero ? test_all (octave::math::positive_sign)
           : do_mx_check<double> (*this, mx_inline_any_positive));
 }
 
@@ -616,7 +616,7 @@
       if (val < min_val)
         min_val = val;
 
-      if (! xisinteger (val))
+      if (! octave::math::isinteger (val))
         return false;
     }
 
@@ -626,7 +626,7 @@
 bool
 NDArray::all_integers (void) const
 {
-  return test_all (xisinteger);
+  return test_all (octave::math::isinteger);
 }
 
 bool
@@ -766,11 +766,11 @@
     {
       double d = elem (i);
 
-      if (xisnan (d))
+      if (octave::math::isnan (d))
         (*current_liboctave_error_handler)
           ("invalid conversion from NaN to character");
 
-      octave_idx_type ival = NINTbig (d);
+      octave_idx_type ival = octave::math::nint_big (d);
 
       if (ival < 0 || ival > std::numeric_limits<unsigned char>::max ())
         // FIXME: is there something better to do? Should we warn the user?
@@ -821,19 +821,19 @@
 boolNDArray
 NDArray::isnan (void) const
 {
-  return do_mx_unary_map<bool, double, xisnan> (*this);
+  return do_mx_unary_map<bool, double, octave::math::isnan> (*this);
 }
 
 boolNDArray
 NDArray::isinf (void) const
 {
-  return do_mx_unary_map<bool, double, xisinf> (*this);
+  return do_mx_unary_map<bool, double, octave::math::isinf> (*this);
 }
 
 boolNDArray
 NDArray::isfinite (void) const
 {
-  return do_mx_unary_map<bool, double, xfinite> (*this);
+  return do_mx_unary_map<bool, double, octave::math::finite> (*this);
 }
 
 void