Ignore:
Timestamp:
Oct 7, 2004 2:13:58 PM (16 years ago)
Author:
forrest
Message:

to make sbb faster

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ClpPackedMatrix.cpp

    r466 r468  
    17701770   probably expect no zeros.  Code can modify matrix to get rid of
    17711771   small elements.
     1772   check bits (can be turned off to save time) :
     1773   1 - check if matrix has gaps
     1774   2 - check if zero elements
     1775   4 - check and compress duplicates
     1776   8 - report on large and small
    17721777*/
    17731778bool
    17741779ClpPackedMatrix::allElementsInRange(ClpModel * model,
    1775                                     double smallest, double largest)
     1780                                    double smallest, double largest,
     1781                                    int check)
    17761782{
    17771783  int iColumn;
     
    17911797  int numberRows = matrix_->getNumRows();
    17921798  int numberColumns = matrix_->getNumCols();
     1799  // Say no gaps
     1800  hasGaps_=false;
     1801  if (check==14) {
     1802    for (iColumn=0;iColumn<numberColumns;iColumn++) {
     1803      CoinBigIndex start = columnStart[iColumn];
     1804      CoinBigIndex end = start + columnLength[iColumn];
     1805      if (end!=columnStart[iColumn+1]) {
     1806        hasGaps_=true;
     1807        break;
     1808      }
     1809    }
     1810    return true;
     1811  }
     1812  assert (check=15);
    17931813  int * mark = new int [numberRows];
    17941814  int i;
    1795   // Say no gaps
    1796   hasGaps_=false;
    17971815  for (i=0;i<numberRows;i++)
    17981816    mark[i]=-1;
Note: See TracChangeset for help on using the changeset viewer.