[Lemon-commits] [lemon_svn] deba: r2665 - hugo/trunk/lemon
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:54:19 CET 2006
Author: deba
Date: Fri Mar 31 14:04:48 2006
New Revision: 2665
Modified:
hugo/trunk/lemon/lp_base.h
Log:
NaN checking to be conform to MinGW32
Modified: hugo/trunk/lemon/lp_base.h
==============================================================================
--- hugo/trunk/lemon/lp_base.h (original)
+++ hugo/trunk/lemon/lp_base.h Fri Mar 31 14:04:48 2006
@@ -159,6 +159,8 @@
static const Value INF;
///The not a number constant
static const Value NaN;
+
+ static inline bool isNaN(const Value& v) { return v!=v; }
///Refer to a column of the LP.
@@ -1105,7 +1107,9 @@
///\e Solve the LP problem at hand
///
- ///\return The result of the optimization procedure. Possible values and their meanings can be found in the documentation of \ref SolveExitStatus.
+ ///\return The result of the optimization procedure. Possible
+ ///values and their meanings can be found in the documentation of
+ ///\ref SolveExitStatus.
///
///\todo Which method is used to solve the problem
SolveExitStatus solve() { return _solve(); }
@@ -1290,7 +1294,7 @@
{
LpSolverBase::Constr tmp(c);
///\todo Create an own exception type.
- if(!isnan(tmp.lowerBound())) throw LogicError();
+ if(!LpSolverBase::isNaN(tmp.lowerBound())) throw LogicError();
else tmp.lowerBound()=n;
return tmp;
}
@@ -1303,7 +1307,7 @@
{
LpSolverBase::Constr tmp(c);
///\todo Create an own exception type.
- if(!isnan(tmp.upperBound())) throw LogicError();
+ if(!LpSolverBase::isNaN(tmp.upperBound())) throw LogicError();
else tmp.upperBound()=n;
return tmp;
}
@@ -1317,7 +1321,7 @@
{
LpSolverBase::Constr tmp(c);
///\todo Create an own exception type.
- if(!isnan(tmp.upperBound())) throw LogicError();
+ if(!LpSolverBase::isNaN(tmp.upperBound())) throw LogicError();
else tmp.upperBound()=n;
return tmp;
}
@@ -1330,7 +1334,7 @@
{
LpSolverBase::Constr tmp(c);
///\todo Create an own exception type.
- if(!isnan(tmp.lowerBound())) throw LogicError();
+ if(!LpSolverBase::isNaN(tmp.lowerBound())) throw LogicError();
else tmp.lowerBound()=n;
return tmp;
}
More information about the Lemon-commits
mailing list