diff -r 7c4ba7daaf5f -r 2b6bffe0e7e8 lemon/clp.cc --- a/lemon/clp.cc Tue Dec 20 17:44:38 2011 +0100 +++ b/lemon/clp.cc Tue Dec 20 18:15:14 2011 +0100 @@ -2,7 +2,7 @@ * * This file is a part of LEMON, a generic C++ optimization library. * - * Copyright (C) 2003-2008 + * Copyright (C) 2003-2010 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * @@ -78,6 +78,19 @@ return _prob->numberRows() - 1; } + int ClpLp::_addRow(Value l, ExprIterator b, ExprIterator e, Value u) { + std::vector indexes; + std::vector values; + + for(ExprIterator it = b; it != e; ++it) { + indexes.push_back(it->first); + values.push_back(it->second); + } + + _prob->addRow(values.size(), &indexes.front(), &values.front(), l, u); + return _prob->numberRows() - 1; + } + void ClpLp::_eraseCol(int c) { _col_names_ref.erase(_prob->getColumnName(c));