Changeset 793:e4554cd6b2bf in lemon for lemon/lp_base.h
 Timestamp:
 10/04/09 00:28:42 (13 years ago)
 Branch:
 default
 Phase:
 public
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/lp_base.h
r631 r793 944 944 virtual int _addRow() = 0; 945 945 946 virtual int _addRow(Value l, ExprIterator b, ExprIterator e, Value u) { 947 int row = _addRow(); 948 _setRowCoeffs(row, b, e); 949 _setRowLowerBound(row, l); 950 _setRowUpperBound(row, u); 951 return row; 952 } 953 946 954 virtual void _eraseCol(int col) = 0; 947 955 virtual void _eraseRow(int row) = 0; … … 1208 1216 ///\return The created row. 1209 1217 Row addRow(Value l,const Expr &e, Value u) { 1210 Row r=addRow(); 1211 row(r,l,e,u); 1218 Row r; 1219 e.simplify(); 1220 r._id = _addRowId(_addRow(l  *e, ExprIterator(e.comps.begin(), cols), 1221 ExprIterator(e.comps.end(), cols), u  *e)); 1212 1222 return r; 1213 1223 } … … 1218 1228 ///\return The created row. 1219 1229 Row addRow(const Constr &c) { 1220 Row r=addRow(); 1221 row(r,c); 1230 Row r; 1231 c.expr().simplify(); 1232 r._id = _addRowId(_addRow(c.lowerBounded()?c.lowerBound():INF, 1233 ExprIterator(c.expr().comps.begin(), cols), 1234 ExprIterator(c.expr().comps.end(), cols), 1235 c.upperBounded()?c.upperBound():INF)); 1222 1236 return r; 1223 1237 }
Note: See TracChangeset
for help on using the changeset viewer.