Ignore:
Timestamp:
Apr 9, 2013 6:32:15 AM (6 years ago)
Author:
forrest
Message:

fixes so sprint will work on unsuitable problems and testGub have no memory leaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/examples/sprint2.cpp

    r1662 r1937  
    7272     // Just take this number of columns in small problem
    7373     int smallNumberColumns = 3 * numberRows;
     74     // To stop seg faults on unsuitable problems
     75     smallNumberColumns = CoinMin(smallNumberColumns,numberColumns);
    7476     // And we want number of rows to be this
    7577     int smallNumberRows = numberRows / 4;
     
    101103               double ratio = ((double) smallNumberRows) / ((double) model2->numberRows());
    102104               smallNumberColumns = (int)(smallNumberColumns * ratio);
     105               // deal with pathological case
     106               smallNumberColumns = CoinMax(smallNumberColumns,0);
    103107          }
    104108          delete model2;
Note: See TracChangeset for help on using the changeset viewer.