# HG changeset patch
# User "Janos Tapolcai <tapolcai@tmit.bme.hu>"
# Date 1232728834 -3600
# Node ID 939d0f436ebe9e8c5f1d5468b004b6f1ab34c1f7
# Parent d07596b0afb57ac5274a7e8c3d7f05a143621e84
bugfix in _addRow(ExprIterator,ExprIterator)
diff --git a/lemon/lp_base.h b/lemon/lp_base.h
a
|
b
|
|
1200 | 1200 | ///\param u is the upper bound (\ref INF means no bound) |
1201 | 1201 | ///\return The created row. |
1202 | 1202 | Row addRow(Value l,const Expr &e, Value u) { |
1203 | | Row r; |
| 1203 | Row r; |
1204 | 1204 | e.simplify(); |
1205 | 1205 | int id=_addRow(ExprIterator(e.comps.begin(), cols), |
1206 | 1206 | ExprIterator(e.comps.end(), cols)); |
1207 | | _setRowLowerBound(id,l - *e); |
1208 | | _setRowUpperBound(id,u - *e); |
1209 | | r._id=id; |
| 1207 | r._id=_addRowId(id); |
| 1208 | _setRowLowerBound(r._id,l - *e); |
| 1209 | _setRowUpperBound(r._id,u - *e); |
1210 | 1210 | return r; |
1211 | 1211 | } |
1212 | 1212 | |
diff --git a/lemon/lp_skeleton.cc b/lemon/lp_skeleton.cc
a
|
b
|
|
43 | 43 | void SkeletonSolverBase::_setRowName(int, const std::string &) {} |
44 | 44 | int SkeletonSolverBase::_rowByName(const std::string&) const { return -1; } |
45 | 45 | |
46 | | int SkeletonSolverBase::_addRow(ExprIterator, ExprIterator) { return -1; } |
| 46 | int SkeletonSolverBase::_addRow(ExprIterator, ExprIterator) { return ++row_num; } |
47 | 47 | void SkeletonSolverBase::_setRowCoeffs(int, ExprIterator, ExprIterator) {} |
48 | 48 | void SkeletonSolverBase::_getRowCoeffs(int, InsertIterator) const {} |
49 | 49 | |