Changeset 3025


Ignore:
Timestamp:
Apr 29, 2020 9:41:32 PM (2 months ago)
Author:
unxusr
Message:

Cbc_getColNz should also query buffer when necessary

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Cbc_C_Interface.cpp

    r3019 r3025  
    20582058  VALIDATE_COL_INDEX( col, model );
    20592059
    2060   const CoinPackedMatrix *cpmCol = model->solver_->getMatrixByCol();
    2061   return cpmCol->getVectorLengths()[col];
     2060  if (col < model->solver_->getNumCols()) {
     2061    const CoinPackedMatrix *cpmCol = model->solver_->getMatrixByCol();
     2062    return cpmCol->getVectorLengths()[col];
     2063  } else {
     2064    int ncidx = model->nCols - model->solver_->getNumCols();
     2065    return model->cStart[ncidx+1] - model->cStart[ncidx];
     2066  }
    20622067}
    20632068
Note: See TracChangeset for help on using the changeset viewer.