24#ifndef COIN_NOTEST_DUPLICATE
25#define COIN_NOTEST_DUPLICATE
29#ifndef COIN_NOTEST_DUPLICATE
30#define COIN_DEFAULT_VALUE_FOR_DUPLICATE true
32#define COIN_DEFAULT_VALUE_FOR_DUPLICATE false
86 / **@name Times used */
89 inline void setTimesUsed(
int t );
91 inline void incrementTimesUsed();
93 inline int timesUsed()
const;
96 / **@name Times tested */
99 inline void setTimesTested(
int t );
101 inline void incrementTimesTested();
103 inline int timesTested()
const;
178 virtual double violated(
const double *solution)
const = 0;
220void OsiCut::setTimesUsed(
int t ) { timesUsed_=t; }
221void OsiCut::incrementTimesUsed() { timesUsed_++; }
222int OsiCut::timesUsed()
const {
return timesUsed_; }
224void OsiCut::setTimesTested(
int t ) { timesTested_=t; }
225void OsiCut::incrementTimesTested() { timesTested_++; }
226int OsiCut::timesTested()
const{
return timesTested_; }
238 return !((*this) == rhs);
OsiCut(const OsiCut &)
Copy constructor.
OsiCut & operator=(const OsiCut &rhs)
Assignment operator.
virtual bool operator==(const OsiCut &rhs) const
equal. 2 cuts are equal if there effectiveness are equal
int globallyValid_
If cut has global validity i.e. can be used anywhere in tree.
virtual bool infeasible(const OsiSolverInterface &si) const =0
Returns true if the cut is infeasible "with respect to itself" and cannot be satisfied.
virtual bool operator>(const OsiCut &rhs) const
less than. True if this.effectiveness > rhs.effectiveness
virtual double violated(const double *solution) const =0
Returns infeasibility of the cut with respect to solution passed in i.e.
virtual bool consistent() const =0
Returns true if the cut is consistent with respect to itself, without considering any data in the mod...
virtual bool operator<(const OsiCut &rhs) const
less than. True if this.effectiveness < rhs.effectiveness
virtual ~OsiCut()
Destructor.
void setNotGloballyValid()
int globallyValidAsInteger() const
Get globallyValid.
void setEffectiveness(double e)
Set effectiveness.
double effectiveness_
Effectiveness.
double effectiveness() const
Get effectiveness.
void setGloballyValid(bool trueFalse)
Set globallyValid (nonzero true)
virtual void print() const
Print cuts in collection.
OsiCut()
Default Constructor.
void setGloballyValidAsInteger(int trueFalse)
Set globallyValid as integer (nonzero true)
bool globallyValid() const
Get globallyValid.
virtual bool operator!=(const OsiCut &rhs) const
not equal
virtual bool consistent(const OsiSolverInterface &si) const =0
Returns true if cut is consistent when considering the solver interface's model.
Abstract Base Class for describing an interface to a solver.