# HG changeset patch # User alpar # Date 1112187718 0 # Node ID 16980bf77bd30a76107a7f02443484f057cb215e # Parent 5676e48ca026d57e335dbbcd4c6f858d016ca975 Minor improvements diff -r 5676e48ca026 -r 16980bf77bd3 src/work/athos/lp/lp_base.h --- a/src/work/athos/lp/lp_base.h Wed Mar 30 12:08:15 2005 +0000 +++ b/src/work/athos/lp/lp_base.h Wed Mar 30 13:01:58 2005 +0000 @@ -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