Ignore:
Timestamp:
Sep 16, 2008 5:31:36 PM (12 years ago)
Author:
ladanyi
Message:

changed max/min to CoinMax/CoinMin?

File:
1 edited

Legend:

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

    r1265 r1276  
    8686  // Just add this number of rows each time in small problem
    8787  int smallNumberRows = 2*numberColumns;
    88   smallNumberRows=min(smallNumberRows,originalNumberRows/20);
     88  smallNumberRows=CoinMin(smallNumberRows,originalNumberRows/20);
    8989  // and pad out with random rows
    9090  double ratio = ((double)(smallNumberRows-numberSort))/((double) originalNumberRows);
     
    104104  double * columnUpper = model2->columnUpper();
    105105  for (iColumn=0;iColumn<numberColumns;iColumn++) {
    106     columnLower[iColumn]=max(-1.0e6,columnLower[iColumn]);
    107     columnUpper[iColumn]=min(1.0e6,columnUpper[iColumn]);
     106    columnLower[iColumn]=CoinMax(-1.0e6,columnLower[iColumn]);
     107    columnUpper[iColumn]=CoinMin(1.0e6,columnUpper[iColumn]);
    108108  }
    109109#endif
     
    183183          if (iPass<takeOutPass&&!dualInfeasible) {
    184184            // may have hit max iterations so check
    185             double infeasibility = max(fullSolution[iRow]-rowUpper[iRow],
     185            double infeasibility = CoinMax(fullSolution[iRow]-rowUpper[iRow],
    186186                                       rowLower[iRow]-fullSolution[iRow]);
    187187            weight[iRow]=-infeasibility;
     
    210210        if (weight[iRow]==1.123e50) {
    211211          // not looked at yet
    212           double infeasibility = max(fullSolution[iRow]-rowUpper[iRow],
     212          double infeasibility = CoinMax(fullSolution[iRow]-rowUpper[iRow],
    213213                                     rowLower[iRow]-fullSolution[iRow]);
    214214          weight[iRow]=-infeasibility;
     
    221221      // sort
    222222      CoinSort_2(weight,weight+originalNumberRows,sort);
    223       numberSort = min(originalNumberRows,smallNumberRows+numberKept);
     223      numberSort = CoinMin(originalNumberRows,smallNumberRows+numberKept);
    224224      memset(take,0,originalNumberRows);
    225225      for (iRow=0;iRow<numberSort;iRow++)
Note: See TracChangeset for help on using the changeset viewer.