[Lemon-commits] [lemon_svn] alpar: r1707 - hugo/trunk/src/work/athos/lp
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:47:06 CET 2006
Author: alpar
Date: Wed Mar 30 15:01:58 2005
New Revision: 1707
Modified:
hugo/trunk/src/work/athos/lp/lp_base.h
Log:
Minor improvements
Modified: hugo/trunk/src/work/athos/lp/lp_base.h
==============================================================================
--- hugo/trunk/src/work/athos/lp/lp_base.h (original)
+++ hugo/trunk/src/work/athos/lp/lp_base.h Wed Mar 30 15:01:58 2005
@@ -298,6 +298,10 @@
Value &upperBound() { return _ub; }
///\e
const Value &upperBound() const { return _ub; }
+ ///\e
+ bool lowerBounded() const { return std::isfinite(_lb); }
+ ///\e
+ bool upperBounded() const { return std::isfinite(_ub); }
};
@@ -484,9 +488,9 @@
///\param c is a linear expression (see \ref Constr)
void setRow(Row r, const Constr &c) {
setRow(r,
- isnan(c.lowerBound())?-INF:c.lowerBound(),
+ c.lowerBounded()?c.lowerBound():-INF,
c.expr(),
- isnan(c.upperBound())?INF:c.upperBound());
+ c.upperBounded()?c.upperBound():INF);
}
///Add a new row (i.e a new constaint) to the LP
More information about the Lemon-commits
mailing list