diff -r 93fcadf94ab0 -r 8d49961ec50f lemon/lp_base.h --- a/lemon/lp_base.h Fri Mar 31 11:10:44 2006 +0000 +++ b/lemon/lp_base.h Fri Mar 31 12:04:48 2006 +0000 @@ -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; }