COIN-OR::LEMON - Graph Library

Changeset 1142:4764031c082c in lemon for lemon/cbc.cc


Ignore:
Timestamp:
05/06/12 16:52:11 (12 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
1.2
Parents:
1127:be7dd3a8d6a3 (diff), 1140:8d281761dea4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Phase:
public
Message:

Merge bugfix #441 to branch 1.2

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lemon/cbc.cc

    r1122 r1142  
    436436
    437437    _prob = new CoinModel();
    438     rows.clear();
    439     cols.clear();
    440438  }
    441439
  • lemon/cbc.cc

    r1140 r1142  
    9090  }
    9191
     92  int CbcMip::_addRow(Value l, ExprIterator b, ExprIterator e, Value u) {
     93    std::vector<int> indexes;
     94    std::vector<Value> values;
     95
     96    for(ExprIterator it = b; it != e; ++it) {
     97      indexes.push_back(it->first);
     98      values.push_back(it->second);
     99    }
     100
     101    _prob->addRow(values.size(), &indexes.front(), &values.front(), l, u);
     102    return _prob->numberRows() - 1;
     103  }
    92104
    93105  void CbcMip::_eraseCol(int i) {
Note: See TracChangeset for help on using the changeset viewer.