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);
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++) {
std::vector< OsiRowCut * > OsiVectorRowCutPtr
Vector of OsiRowCut pointers.
std::vector< OsiColCut * > OsiVectorColCutPtr
Vector of OsiColCut pointers.
virtual OsiColCut * clone() const
Clone.
virtual void print() const
Print cuts in collection.
double effectiveness() const
Get effectiveness.
bool operator()(const OsiCut *c1P, const OsiCut *c2P)
Function for sorting cuts by effectiveness.
bool operator<(const const_iterator &it) const
bool operator==(const const_iterator &it) const
const_iterator operator++(int)
bool operator!=(const const_iterator &it) const
const_iterator(const const_iterator &src)
const OsiCut * operator*() const
const_iterator operator++()
const_iterator(const OsiCuts &cuts)
std::forward_iterator_tag iterator_category
const_iterator & operator=(const const_iterator &rhs)
bool operator==(const iterator &it) const
OsiCut * operator*() const
bool operator<(const iterator &it) const
bool operator!=(const iterator &it) const
iterator(const iterator &src)
iterator & operator=(const iterator &rhs)
Collections of row cuts and column cuts.
int sizeRowCuts() const
Number of row cuts in collection.
void eraseAndDumpCuts(const std::vector< int > to_erase)
Selective delete and clear for row cuts.
void gutsOfCopy(const OsiCuts &source)
Copy internal data.
OsiCuts & operator=(const OsiCuts &rhs)
Assignment operator.
friend void OsiCutsUnitTest()
A function that tests the methods in the OsiCuts class.
OsiVectorRowCutPtr rowCutPtrs_
Vector of row cuts pointers.
const_iterator end() const
Get const iterator to end of collection.
void insert(const OsiRowCut &rc)
Insert a row cut.
void eraseColCut(int i)
Remove i'th column cut from collection.
iterator end()
Get iterator to end of collection.
OsiColCut & colCut(int i)
Get reference to i'th column cut.
OsiVectorColCutPtr colCutPtrs_
Vector of column cuts pointers.
void sort()
Cuts with greatest effectiveness are first.
void gutsOfDestructor()
Delete internal data.
iterator begin()
Get iterator to beginning of collection.
OsiCuts()
Default constructor.
OsiRowCut * rowCutPtr(int i)
Get pointer to i'th row cut.
const OsiCut * mostEffectiveCutPtr() const
Get const pointer to the most effective cut.
void printCuts() const
Print cuts in collection.
const_iterator begin() const
Get const iterator to beginning of collection.
int sizeCuts() const
Number of cuts in collection.
OsiRowCut * rowCutPtrAndZap(int i)
Get pointer to i'th row cut and remove ptr from collection.
virtual ~OsiCuts()
Destructor.
void insertIfNotDuplicate(OsiRowCut &rc, CoinRelFltEq treatAsSame)
Insert a row cut unless it is a duplicate - cut may get sorted.
void dumpCuts()
Clear all row cuts without deleting them.
void eraseRowCut(int i)
Remove i'th row cut from collection.
OsiRowCut & rowCut(int i)
Get reference to i'th row cut.
void insertIfNotDuplicate(OsiRowCut &rc, CoinAbsFltEq treatAsSame=CoinAbsFltEq(1.0e-12))
Insert a row cut unless it is a duplicate - cut may get sorted.
OsiColCut * colCutPtr(int i)
Get pointer to i'th column cut.
int sizeColCuts() const
Number of column cuts in collection.
OsiCuts(const OsiCuts &)
Copy constructor.
virtual void print() const
Print cuts in collection.
virtual OsiRowCut * clone() const
Clone.