Changeset 624


Ignore:
Timestamp:
Apr 15, 2008 1:28:14 PM (12 years ago)
Author:
rlh
Message:

Undoing change committed in r621

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stable/0.51/Cgl/src/CglFlowCover/CglFlowCover.cpp

    r621 r624  
    6969    }
    7070    rowTypes_ = new CglFlowRowType [numRows];// Distructor will free memory
    71  
    72    // Get integer types
    73     const char * colTypes = si.columnType (true);
    7471   
    7572    // Summarize the row type infomation.
     
    191188            double xCoef, yCoef;
    192189
    193             if ( colTypes[index0]==1 ) {
     190            if ( si.isBinary(index0) ) {
    194191                xInd  = index0;   yInd  = index1;
    195192                xCoef = coef0;    yCoef = coef1;
     
    482479    CglFlowVUB VUB;
    483480
    484     // Get integer types
    485     const char * colTypes = si.columnType ();
    486481    for (i = 0; i < rowLen; ++i) {
    487482        if ( xlp[ind[i]] - floor(xlp[ind[i]]) > EPSILON_ && ceil(xlp[ind[i]]) - xlp[ind[i]] > EPSILON_ )
     
    540535        }
    541536
    542         if ( colTypes[ind[i]]==1 ) {   // Binary variable
     537        if ( si.isBinary(ind[i]) ) {   // Binary variable
    543538            value = coef[i];
    544539            if (value > EPSILON_)
     
    11401135   
    11411136    CglFlowRowType rowType = CGLFLOW_ROW_UNDEFINED;
    1142     // Get integer types
    1143     const char * colTypes = si.columnType ();
    11441137   
    11451138    int  numPosBin = 0;      // num of positive binary variables
     
    11611154        if ( coef[i] < -EPSILON_ ) {
    11621155            ++numNegCol;
    1163             if( colTypes[ind[i]]==1 )
     1156            if( si.isBinary(ind[i]) )
    11641157                ++numNegBin;
    11651158        }
    11661159        else {
    11671160            ++numPosCol;
    1168             if( colTypes[ind[i]]==1 )
     1161            if( si.isBinary(ind[i]) )
    11691162                ++numPosBin;   
    11701163        }
Note: See TracChangeset for help on using the changeset viewer.