lemon/clp.cc
changeset 1205 57abff252556
parent 1130 0759d974de81
child 1206 86a5b114a066
     1.1 --- a/lemon/clp.cc	Sat Oct 27 13:00:48 2018 +0200
     1.2 +++ b/lemon/clp.cc	Wed Jan 20 16:17:21 2021 +0100
     1.3 @@ -227,14 +227,14 @@
     1.4    }
     1.5  
     1.6    ClpLp::Value ClpLp::_getCoeff(int ix, int jx) const {
     1.7 -    CoinBigIndex begin = _prob->clpMatrix()->getVectorStarts()[ix];
     1.8 -    CoinBigIndex end = begin + _prob->clpMatrix()->getVectorLengths()[ix];
     1.9 +    CoinBigIndex begin = _prob->clpMatrix()->getVectorStarts()[jx];
    1.10 +    CoinBigIndex end = begin + _prob->clpMatrix()->getVectorLengths()[jx];
    1.11  
    1.12      const int* indices = _prob->clpMatrix()->getIndices();
    1.13      const double* elements = _prob->clpMatrix()->getElements();
    1.14  
    1.15 -    const int* it = std::lower_bound(indices + begin, indices + end, jx);
    1.16 -    if (it != indices + end && *it == jx) {
    1.17 +    const int* it = std::lower_bound(indices + begin, indices + end, ix);
    1.18 +    if (it != indices + end && *it == ix) {
    1.19        return elements[it - indices];
    1.20      } else {
    1.21        return 0.0;