Changes in lemon/cplex.cc [793:e4554cd6b2bf:623:745e182d0139] in lemon
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/cplex.cc
r793 r623 112 112 } 113 113 114 int CplexBase::_addRow(Value lb, ExprIterator b,115 ExprIterator e, Value ub) {116 int i = CPXgetnumrows(cplexEnv(), _prob);117 if (lb == -INF) {118 const char s = 'L';119 CPXnewrows(cplexEnv(), _prob, 1, &ub, &s, 0, 0);120 } else if (ub == INF) {121 const char s = 'G';122 CPXnewrows(cplexEnv(), _prob, 1, &lb, &s, 0, 0);123 } else if (lb == ub){124 const char s = 'E';125 CPXnewrows(cplexEnv(), _prob, 1, &lb, &s, 0, 0);126 } else {127 const char s = 'R';128 double len = ub - lb;129 CPXnewrows(cplexEnv(), _prob, 1, &lb, &s, &len, 0);130 }131 132 std::vector<int> indices;133 std::vector<int> rowlist;134 std::vector<Value> values;135 136 for(ExprIterator it=b; it!=e; ++it) {137 indices.push_back(it->first);138 values.push_back(it->second);139 rowlist.push_back(i);140 }141 142 CPXchgcoeflist(cplexEnv(), _prob, values.size(),143 &rowlist.front(), &indices.front(), &values.front());144 145 return i;146 }147 114 148 115 void CplexBase::_eraseCol(int i) {
Note: See TracChangeset
for help on using the changeset viewer.