Changeset 2366 for trunk


Ignore:
Timestamp:
Nov 11, 2018 8:46:31 AM (11 months ago)
Author:
forrest
Message:

Clp_printModel mistakenly assumed matrix has no gaps

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/Clp_C_Interface.cpp

    r2271 r2366  
    11831183     CoinBigIndex numelem    = clp_simplex->getNumElements();
    11841184     const CoinBigIndex *start = clp_simplex->matrix()->getVectorStarts();
     1185     const int *length = clp_simplex->matrix()->getVectorLengths();
    11851186     const int *index     = clp_simplex->matrix()->getIndices();
    11861187     const double *value  = clp_simplex->matrix()->getElements();
     
    11991200          for (i = 0; i <= numcols; i++)
    12001201               printf("%s start[%i] = %i\n", prefix, i, start[i]);
    1201           for (i = 0; i < numelem; i++)
     1202          // may be gaps
     1203          for (i = 0; i < numcols; i++) {
     1204            for (CoinBigIndex j=start[i];j<start[i]+length[i];j++)
    12021205               printf("%s index[%i] = %i, value[%i] = %g\n",
    1203                       prefix, i, index[i], i, value[i]);
     1206                      prefix, j, index[j], j, value[j]);
     1207          }
    12041208     }
    12051209
Note: See TracChangeset for help on using the changeset viewer.