[Lemon-commits] Balazs Dezso: Fix LpBase::addRow(Constr) (#334)

Lemon HG hg at lemon.cs.elte.hu
Mon Feb 15 09:05:55 CET 2010


details:   http://lemon.cs.elte.hu/hg/lemon/rev/207ba6c0f2e4
changeset: 903:207ba6c0f2e4
user:      Balazs Dezso <deba [at] inf.elte.hu>
date:      Thu Dec 10 09:09:08 2009 +0100
description:
	Fix LpBase::addRow(Constr) (#334)

diffstat:

 lemon/lp_base.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (16 lines):

diff --git a/lemon/lp_base.h b/lemon/lp_base.h
--- a/lemon/lp_base.h
+++ b/lemon/lp_base.h
@@ -1229,10 +1229,10 @@
     Row addRow(const Constr &c) {
       Row r;
       c.expr().simplify();
-      r._id = _addRowId(_addRow(c.lowerBounded()?c.lowerBound():-INF, 
+      r._id = _addRowId(_addRow(c.lowerBounded()?c.lowerBound()-*c.expr():-INF, 
                                 ExprIterator(c.expr().comps.begin(), cols),
                                 ExprIterator(c.expr().comps.end(), cols),
-                                c.upperBounded()?c.upperBound():INF));
+                                c.upperBounded()?c.upperBound()-*c.expr():INF));
       return r;
     }
     ///Erase a column (i.e a variable) from the LP



More information about the Lemon-commits mailing list