1.1 --- a/lemon/clp.cc Fri Aug 09 11:07:27 2013 +0200
1.2 +++ b/lemon/clp.cc Sun Aug 11 15:28:12 2013 +0200
1.3 @@ -2,7 +2,7 @@
1.4 *
1.5 * This file is a part of LEMON, a generic C++ optimization library.
1.6 *
1.7 - * Copyright (C) 2003-2008
1.8 + * Copyright (C) 2003-2010
1.9 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
1.10 * (Egervary Research Group on Combinatorial Optimization, EGRES).
1.11 *
1.12 @@ -78,6 +78,19 @@
1.13 return _prob->numberRows() - 1;
1.14 }
1.15
1.16 + int ClpLp::_addRow(Value l, ExprIterator b, ExprIterator e, Value u) {
1.17 + std::vector<int> indexes;
1.18 + std::vector<Value> values;
1.19 +
1.20 + for(ExprIterator it = b; it != e; ++it) {
1.21 + indexes.push_back(it->first);
1.22 + values.push_back(it->second);
1.23 + }
1.24 +
1.25 + _prob->addRow(values.size(), &indexes.front(), &values.front(), l, u);
1.26 + return _prob->numberRows() - 1;
1.27 + }
1.28 +
1.29
1.30 void ClpLp::_eraseCol(int c) {
1.31 _col_names_ref.erase(_prob->getColumnName(c));