# HG changeset patch
# User Alpar Juttner <alpar@cs.elte.hu>
# Date 1234537269 0
# Node ID 06787db0ef5f32288363ad86b18510f48c1a8db5
# Parent  bc0a130bbb46a89213c6e74e5d1f23b892c32ab3
Change LEMON's isnan() to isNaN() for the sake of AIX/xlC

Certain xlC versions implement isnan() as a #define.

diff -r bc0a130bbb46 -r 06787db0ef5f lemon/lp_base.h
--- a/lemon/lp_base.h	Fri Feb 13 14:56:27 2009 +0000
+++ b/lemon/lp_base.h	Fri Feb 13 15:01:09 2009 +0000
@@ -597,11 +597,11 @@
       const Value &upperBound() const { return _ub; }
       ///Is the constraint lower bounded?
       bool lowerBounded() const {
-        return _lb != -INF && !isnan(_lb);
+        return _lb != -INF && !isNaN(_lb);
       }
       ///Is the constraint upper bounded?
       bool upperBounded() const {
-        return _ub != INF && !isnan(_ub);
+        return _ub != INF && !isNaN(_ub);
       }
 
     };
@@ -1666,7 +1666,7 @@
   inline LpBase::Constr operator<=(const LpBase::Value &n,
                                    const LpBase::Constr &c) {
     LpBase::Constr tmp(c);
-    LEMON_ASSERT(isnan(tmp.lowerBound()), "Wrong LP constraint");
+    LEMON_ASSERT(isNaN(tmp.lowerBound()), "Wrong LP constraint");
     tmp.lowerBound()=n;
     return tmp;
   }
@@ -1678,7 +1678,7 @@
                                    const LpBase::Value &n)
   {
     LpBase::Constr tmp(c);
-    LEMON_ASSERT(isnan(tmp.upperBound()), "Wrong LP constraint");
+    LEMON_ASSERT(isNaN(tmp.upperBound()), "Wrong LP constraint");
     tmp.upperBound()=n;
     return tmp;
   }
@@ -1690,7 +1690,7 @@
   inline LpBase::Constr operator>=(const LpBase::Value &n,
                                    const LpBase::Constr &c) {
     LpBase::Constr tmp(c);
-    LEMON_ASSERT(isnan(tmp.upperBound()), "Wrong LP constraint");
+    LEMON_ASSERT(isNaN(tmp.upperBound()), "Wrong LP constraint");
     tmp.upperBound()=n;
     return tmp;
   }
@@ -1702,7 +1702,7 @@
                                    const LpBase::Value &n)
   {
     LpBase::Constr tmp(c);
-    LEMON_ASSERT(isnan(tmp.lowerBound()), "Wrong LP constraint");
+    LEMON_ASSERT(isNaN(tmp.lowerBound()), "Wrong LP constraint");
     tmp.lowerBound()=n;
     return tmp;
   }
diff -r bc0a130bbb46 -r 06787db0ef5f lemon/math.h
--- a/lemon/math.h	Fri Feb 13 14:56:27 2009 +0000
+++ b/lemon/math.h	Fri Feb 13 15:01:09 2009 +0000
@@ -60,7 +60,7 @@
   ///This function checks whether the parameter is NaN or not.
   ///Is should be equivalent with std::isnan(), but it is not
   ///provided by all compilers.
-  inline bool isnan(double v)
+  inline bool isNaN(double v)
     {
       return v!=v;
     }