lemon/cbc.cc
changeset 753 48fe2a46bf91
parent 576 745e182d0139
child 974 b1744d7bdb47
child 998 7fdaa05a69a1
equal deleted inserted replaced
1:4d624687930e 2:d215b9987f23
    92   int CbcMip::_addRow() {
    92   int CbcMip::_addRow() {
    93     _prob->addRow(0, 0, 0, -COIN_DBL_MAX, COIN_DBL_MAX);
    93     _prob->addRow(0, 0, 0, -COIN_DBL_MAX, COIN_DBL_MAX);
    94     return _prob->numberRows() - 1;
    94     return _prob->numberRows() - 1;
    95   }
    95   }
    96 
    96 
       
    97   int CbcMip::_addRow(Value l, ExprIterator b, ExprIterator e, Value u) {
       
    98     std::vector<int> indexes;
       
    99     std::vector<Value> values;
       
   100 
       
   101     for(ExprIterator it = b; it != e; ++it) {
       
   102       indexes.push_back(it->first);
       
   103       values.push_back(it->second);
       
   104     }
       
   105 
       
   106     _prob->addRow(values.size(), &indexes.front(), &values.front(), l, u);
       
   107     return _prob->numberRows() - 1;
       
   108   }
    97 
   109 
    98   void CbcMip::_eraseCol(int i) {
   110   void CbcMip::_eraseCol(int i) {
    99     _prob->deleteColumn(i);
   111     _prob->deleteColumn(i);
   100   }
   112   }
   101 
   113