gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
Own support for isnan()
0 2 0
default
2 files changed with 15 insertions and 6 deletions:
↑ Collapse diff ↑
Show white space 6 line context
... ...
@@ -599,3 +599,3 @@
599 599
      bool lowerBounded() const {
600
        return _lb != -INF && !std::isnan(_lb);
600
        return _lb != -INF && !isnan(_lb);
601 601
      }
... ...
@@ -603,3 +603,3 @@
603 603
      bool upperBounded() const {
604
        return _ub != INF && !std::isnan(_ub);
604
        return _ub != INF && !isnan(_ub);
605 605
      }
... ...
@@ -1668,3 +1668,3 @@
1668 1668
    LpBase::Constr tmp(c);
1669
    LEMON_ASSERT(std::isnan(tmp.lowerBound()), "Wrong LP constraint");
1669
    LEMON_ASSERT(isnan(tmp.lowerBound()), "Wrong LP constraint");
1670 1670
    tmp.lowerBound()=n;
... ...
@@ -1680,3 +1680,3 @@
1680 1680
    LpBase::Constr tmp(c);
1681
    LEMON_ASSERT(std::isnan(tmp.upperBound()), "Wrong LP constraint");
1681
    LEMON_ASSERT(isnan(tmp.upperBound()), "Wrong LP constraint");
1682 1682
    tmp.upperBound()=n;
... ...
@@ -1692,3 +1692,3 @@
1692 1692
    LpBase::Constr tmp(c);
1693
    LEMON_ASSERT(std::isnan(tmp.upperBound()), "Wrong LP constraint");
1693
    LEMON_ASSERT(isnan(tmp.upperBound()), "Wrong LP constraint");
1694 1694
    tmp.upperBound()=n;
... ...
@@ -1704,3 +1704,3 @@
1704 1704
    LpBase::Constr tmp(c);
1705
    LEMON_ASSERT(std::isnan(tmp.lowerBound()), "Wrong LP constraint");
1705
    LEMON_ASSERT(isnan(tmp.lowerBound()), "Wrong LP constraint");
1706 1706
    tmp.lowerBound()=n;
Ignore white space 6 line context
... ...
@@ -57,2 +57,11 @@
57 57

	
58
  ///Check whether the parameter is NaN or not
59
  
60
  ///This function checks whether the parameter is NaN or not.
61
  ///Is should be equivalent with std::isnan(), but it is not
62
  ///provided by all compilers.
63
  inline bool isnan(double v)
64
    {
65
      return v!=v;
66
    }
58 67

	
0 comments (0 inline)