8 #include "CoinPragma.hpp" 15 #include "CoinFloatEqual.hpp" 52 return !((*this)==it);
104 return !((*this)==it);
310 rowCutPtrs_.push_back(static_cast<OsiRowCut*>(newCutPtr));
316 colCutPtrs_.push_back(static_cast<OsiColCut*>(newCutPtr));
332 OsiRowCut * rcPtr = dynamic_cast<OsiRowCut*>(cPtr);
333 if ( rcPtr != NULL ) {
338 OsiColCut * ccPtr = dynamic_cast<OsiColCut*>(cPtr);
339 assert( ccPtr != NULL );
351 const OsiRowCut * rCut = dynamic_cast <const OsiRowCut * >(*it);
352 const OsiColCut * cCut = dynamic_cast <const OsiColCut * >(*it);
353 assert (rCut || cCut);
409 double maxEff = COIN_DBL_MIN;
411 if (maxEff < (*it)->effectiveness() ) {
428 for (i=0;i<numberColCuts;i++) {
433 for (i=0;i<numberRowCuts;i++) {
467 for (
unsigned i=0; i<to_erase.size(); i++) {
void gutsOfDestructor()
Delete internal data.
OsiVectorColCutPtr colCutPtrs_
Vector of column cuts pointers.
const_iterator operator++(int)
std::vector< OsiRowCut * > OsiVectorRowCutPtr
Vector of OsiRowCut pointers.
void dumpCuts()
Clear all row cuts without deleting them.
virtual ~OsiCuts()
Destructor.
std::vector< OsiColCut * > OsiVectorColCutPtr
Vector of OsiColCut pointers.
iterator begin()
Get iterator to beginning of collection.
bool operator<(const const_iterator &it) const
OsiRowCut * rowCutPtrAndZap(int i)
Get pointer to i'th row cut and remove ptr from collection.
void insertIfNotDuplicate(OsiRowCut &rc, CoinAbsFltEq treatAsSame=CoinAbsFltEq(1.0e-12))
Insert a row cut unless it is a duplicate - cut may get sorted.
const_iterator operator++()
OsiRowCut * rowCutPtr(int i)
Get pointer to i'th row cut.
void eraseColCut(int i)
Remove i'th column cut from collection.
Collections of row cuts and column cuts.
int sizeRowCuts() const
Number of row cuts in collection.
const OsiCut * operator *() const
const_iterator end() const
Get const iterator to end of collection.
OsiColCut * colCutPtr(int i)
Get pointer to i'th column cut.
int sizeColCuts() const
Number of column cuts in collection.
bool operator==(const const_iterator &it) const
const_iterator begin() const
Get const iterator to beginning of collection.
int sizeCuts() const
Number of cuts in collection.
bool operator==(const iterator &it) const
const_iterator & operator=(const const_iterator &rhs)
OsiCut * operator *() const
std::forward_iterator_tag iterator_category
virtual OsiRowCut * clone() const
Clone.
friend void OsiCutsUnitTest()
A function that tests the methods in the OsiCuts class.
iterator & operator=(const iterator &rhs)
bool operator<(const iterator &it) const
virtual void print() const
Print cuts in collection.
OsiRowCut & rowCut(int i)
Get reference to i'th row cut.
void eraseRowCut(int i)
Remove i'th row cut from collection.
void eraseAndDumpCuts(const std::vector< int > to_erase)
Selective delete and clear for row cuts.
bool operator!=(const const_iterator &it) const
void insert(const OsiRowCut &rc)
Insert a row cut.
void printCuts() const
Print cuts in collection.
virtual void print() const
Print cuts in collection.
void gutsOfCopy(const OsiCuts &source)
Copy internal data.
const OsiCut * mostEffectiveCutPtr() const
Get const pointer to the most effective cut.
OsiColCut & colCut(int i)
Get reference to i'th column cut.
double effectiveness() const
Get effectiveness.
void sort()
Cuts with greatest effectiveness are first.
bool operator!=(const iterator &it) const
OsiCuts & operator=(const OsiCuts &rhs)
Assignment operator.
iterator end()
Get iterator to end of collection.
OsiCuts()
Default constructor.
OsiVectorRowCutPtr rowCutPtrs_
Vector of row cuts pointers.
bool operator()(const OsiCut *c1P, const OsiCut *c2P)
Function for sorting cuts by effectiveness.
virtual OsiColCut * clone() const
Clone.