lemon/lp_base.h
changeset 879 d6052a9c4e8d
parent 786 e20173729589
child 877 141f9c0db4a3
equal deleted inserted replaced
10:99e2f5227d5c 11:a676d488eee1
  1227     ///\param c is a linear expression (see \ref Constr)
  1227     ///\param c is a linear expression (see \ref Constr)
  1228     ///\return The created row.
  1228     ///\return The created row.
  1229     Row addRow(const Constr &c) {
  1229     Row addRow(const Constr &c) {
  1230       Row r;
  1230       Row r;
  1231       c.expr().simplify();
  1231       c.expr().simplify();
  1232       r._id = _addRowId(_addRow(c.lowerBounded()?c.lowerBound():-INF, 
  1232       r._id = _addRowId(_addRow(c.lowerBounded()?c.lowerBound()-*c.expr():-INF, 
  1233                                 ExprIterator(c.expr().comps.begin(), cols),
  1233                                 ExprIterator(c.expr().comps.begin(), cols),
  1234                                 ExprIterator(c.expr().comps.end(), cols),
  1234                                 ExprIterator(c.expr().comps.end(), cols),
  1235                                 c.upperBounded()?c.upperBound():INF));
  1235                                 c.upperBounded()?c.upperBound()-*c.expr():INF));
  1236       return r;
  1236       return r;
  1237     }
  1237     }
  1238     ///Erase a column (i.e a variable) from the LP
  1238     ///Erase a column (i.e a variable) from the LP
  1239 
  1239 
  1240     ///\param c is the column to be deleted
  1240     ///\param c is the column to be deleted