lemon/clp.cc
changeset 788 c92296660262
parent 576 745e182d0139
child 877 141f9c0db4a3
equal deleted inserted replaced
3:255a199538de 4:124ae1ba9de6
    76   int ClpLp::_addRow() {
    76   int ClpLp::_addRow() {
    77     _prob->addRow(0, 0, 0, -COIN_DBL_MAX, COIN_DBL_MAX);
    77     _prob->addRow(0, 0, 0, -COIN_DBL_MAX, COIN_DBL_MAX);
    78     return _prob->numberRows() - 1;
    78     return _prob->numberRows() - 1;
    79   }
    79   }
    80 
    80 
       
    81   int ClpLp::_addRow(Value l, ExprIterator b, ExprIterator e, Value u) {
       
    82     std::vector<int> indexes;
       
    83     std::vector<Value> values;
       
    84 
       
    85     for(ExprIterator it = b; it != e; ++it) {
       
    86       indexes.push_back(it->first);
       
    87       values.push_back(it->second);
       
    88     }
       
    89 
       
    90     _prob->addRow(values.size(), &indexes.front(), &values.front(), l, u);
       
    91     return _prob->numberRows() - 1;
       
    92   }
       
    93 
    81 
    94 
    82   void ClpLp::_eraseCol(int c) {
    95   void ClpLp::_eraseCol(int c) {
    83     _col_names_ref.erase(_prob->getColumnName(c));
    96     _col_names_ref.erase(_prob->getColumnName(c));
    84     _prob->deleteColumns(1, &c);
    97     _prob->deleteColumns(1, &c);
    85   }
    98   }