lemon/cbc.cc
changeset 780 580af8cf2f6a
parent 576 745e182d0139
child 952 0976225b5cae
child 964 7fdaa05a69a1
     1.1 --- a/lemon/cbc.cc	Thu Nov 05 10:01:02 2009 +0100
     1.2 +++ b/lemon/cbc.cc	Thu Nov 05 10:23:16 2009 +0100
     1.3 @@ -94,6 +94,18 @@
     1.4      return _prob->numberRows() - 1;
     1.5    }
     1.6  
     1.7 +  int CbcMip::_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    void CbcMip::_eraseCol(int i) {
    1.21      _prob->deleteColumn(i);