COIN-OR::LEMON - Graph Library

Changeset 1427:57abff252556 in lemon for lemon


Ignore:
Timestamp:
01/20/21 16:17:21 (3 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Phase:
public
Message:

Bugfixes in CplexBase? and ClpLp? (#639)

Location:
lemon
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lemon/clp.cc

    r1336 r1427  
    228228
    229229  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];
    232232
    233233    const int* indices = _prob->clpMatrix()->getIndices();
    234234    const double* elements = _prob->clpMatrix()->getElements();
    235235
    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) {
    238238      return elements[it - indices];
    239239    } else {
  • lemon/cplex.cc

    r1349 r1427  
    159159      const char s = 'R';
    160160      double len = ub - lb;
    161       CPXaddrows(cplexEnv(), _prob, 0, 1, values.size(), &ub, &s,
     161      CPXaddrows(cplexEnv(), _prob, 0, 1, values.size(), &lb, &s,
    162162                 &rmatbeg, &indices.front(), &values.front(), 0, 0);
    163163      CPXchgrngval(cplexEnv(), _prob, 1, &i, &len);
Note: See TracChangeset for help on using the changeset viewer.