Changeset 1427:57abff252556 in lemon for lemon
- Timestamp:
- 01/20/21 16:17:21 (3 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- lemon
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/clp.cc
r1336 r1427 228 228 229 229 ClpLp::Value ClpLp::_getCoeff(int ix, int jx) const { 230 CoinBigIndex begin = _prob->clpMatrix()->getVectorStarts()[ ix];231 CoinBigIndex end = begin + _prob->clpMatrix()->getVectorLengths()[ ix];230 CoinBigIndex begin = _prob->clpMatrix()->getVectorStarts()[jx]; 231 CoinBigIndex end = begin + _prob->clpMatrix()->getVectorLengths()[jx]; 232 232 233 233 const int* indices = _prob->clpMatrix()->getIndices(); 234 234 const double* elements = _prob->clpMatrix()->getElements(); 235 235 236 const int* it = std::lower_bound(indices + begin, indices + end, jx);237 if (it != indices + end && *it == jx) {236 const int* it = std::lower_bound(indices + begin, indices + end, ix); 237 if (it != indices + end && *it == ix) { 238 238 return elements[it - indices]; 239 239 } else { -
lemon/cplex.cc
r1349 r1427 159 159 const char s = 'R'; 160 160 double len = ub - lb; 161 CPXaddrows(cplexEnv(), _prob, 0, 1, values.size(), & ub, &s,161 CPXaddrows(cplexEnv(), _prob, 0, 1, values.size(), &lb, &s, 162 162 &rmatbeg, &indices.front(), &values.front(), 0, 0); 163 163 CPXchgrngval(cplexEnv(), _prob, 1, &i, &len);
Note: See TracChangeset
for help on using the changeset viewer.