Fix LpBase::addRow(Constr) (#334)
authorBalazs Dezso <deba@inf.elte.hu>
Thu, 10 Dec 2009 09:09:08 +0100
changeset 903207ba6c0f2e4
parent 863 6be1f9bd2ac0
child 904 b9b2e8abe70b
Fix LpBase::addRow(Constr) (#334)
lemon/lp_base.h
     1.1 --- a/lemon/lp_base.h	Wed Dec 09 11:14:06 2009 +0100
     1.2 +++ b/lemon/lp_base.h	Thu Dec 10 09:09:08 2009 +0100
     1.3 @@ -1229,10 +1229,10 @@
     1.4      Row addRow(const Constr &c) {
     1.5        Row r;
     1.6        c.expr().simplify();
     1.7 -      r._id = _addRowId(_addRow(c.lowerBounded()?c.lowerBound():-INF, 
     1.8 +      r._id = _addRowId(_addRow(c.lowerBounded()?c.lowerBound()-*c.expr():-INF, 
     1.9                                  ExprIterator(c.expr().comps.begin(), cols),
    1.10                                  ExprIterator(c.expr().comps.end(), cols),
    1.11 -                                c.upperBounded()?c.upperBound():INF));
    1.12 +                                c.upperBounded()?c.upperBound()-*c.expr():INF));
    1.13        return r;
    1.14      }
    1.15      ///Erase a column (i.e a variable) from the LP