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