[Coin-osi-devel] OsiCuts.hpp -- dumpCuts()

Francois Margot fmargot at andrew.cmu.edu
Sat Apr 15 10:48:29 EDT 2006


The code for dumpCut() in OsiCuts.hpp is:

     void dumpCuts()
 	{
       	while (rowCutPtrs_.size()>0)
           rowCutPtrs_.erase(rowCutPtrs_.begin());
     	}

It seems to me that using either

 	iterator it = rowCutPtrs_.end();
       	while(it != rowCutPtrs_.begin())
 	  it--;
           rowCutPtrs_.erase(it);
     	}

or

    rowCutPtrs_.clear();

would be more far more efficient.

Francois



More information about the Osi mailing list