1.1 --- a/src/work/athos/lp/lp_base.h Wed Mar 30 12:08:15 2005 +0000
1.2 +++ b/src/work/athos/lp/lp_base.h Wed Mar 30 13:01:58 2005 +0000
1.3 @@ -298,6 +298,10 @@
1.4 Value &upperBound() { return _ub; }
1.5 ///\e
1.6 const Value &upperBound() const { return _ub; }
1.7 + ///\e
1.8 + bool lowerBounded() const { return std::isfinite(_lb); }
1.9 + ///\e
1.10 + bool upperBounded() const { return std::isfinite(_ub); }
1.11 };
1.12
1.13
1.14 @@ -484,9 +488,9 @@
1.15 ///\param c is a linear expression (see \ref Constr)
1.16 void setRow(Row r, const Constr &c) {
1.17 setRow(r,
1.18 - isnan(c.lowerBound())?-INF:c.lowerBound(),
1.19 + c.lowerBounded()?c.lowerBound():-INF,
1.20 c.expr(),
1.21 - isnan(c.upperBound())?INF:c.upperBound());
1.22 + c.upperBounded()?c.upperBound():INF);
1.23 }
1.24
1.25 ///Add a new row (i.e a new constaint) to the LP