lemon/clp.cc
changeset 793 e4554cd6b2bf
parent 623 745e182d0139
child 956 141f9c0db4a3
     1.1 --- a/lemon/clp.cc	Fri Oct 02 17:03:43 2009 +0200
     1.2 +++ b/lemon/clp.cc	Sun Oct 04 00:28:42 2009 +0200
     1.3 @@ -78,6 +78,19 @@
     1.4      return _prob->numberRows() - 1;
     1.5    }
     1.6  
     1.7 +  int ClpLp::_addRow(Value l, ExprIterator b, ExprIterator e, Value u) {
     1.8 +    std::vector<int> indexes;
     1.9 +    std::vector<Value> values;
    1.10 +
    1.11 +    for(ExprIterator it = b; it != e; ++it) {
    1.12 +      indexes.push_back(it->first);
    1.13 +      values.push_back(it->second);
    1.14 +    }
    1.15 +
    1.16 +    _prob->addRow(values.size(), &indexes.front(), &values.front(), l, u);
    1.17 +    return _prob->numberRows() - 1;
    1.18 +  }
    1.19 +
    1.20  
    1.21    void ClpLp::_eraseCol(int c) {
    1.22      _col_names_ref.erase(_prob->getColumnName(c));