14 #ifdef OSI_INLINE_ROWCUT_METHODS
15 #define OsiRowCut_inline inline
17 #define OsiRowCut_inline
31 const std::string &mpsDir);
62 const int *colIndices,
63 const double *elements,
76 using OsiCut::operator==;
84 using OsiCut::operator!=;
124 virtual double violated(
const double *solution)
const;
181 int capacity,
int size,
182 int *&colIndices,
double *&elements);
190 virtual void print()
const;
206 #ifdef OSI_INLINE_ROWCUT_METHODS
220 const int *colIndices,
const double *elements)
250 if (this->OsiCut::operator!=(rhs))
254 if (
lb() != rhs.
lb())
256 if (
ub() != rhs.
ub())
262 return !((*this) ==
rhs);
double ub_
Row upper bound.
void operator+=(double value)
add value to every vector entry
friend void OsiRowCutUnitTest(const OsiSolverInterface *baseSiP, const std::string &mpsDir)
A function that tests the methods in the OsiRowCut class.
OsiRowCut_inline bool operator!=(const OsiRowCut &rhs) const
not equal
double lb_
Row lower bound.
OsiRowCut2(const OsiRowCut2 &)
Copy constructor.
OsiRowCut_inline double lb() const
Get lower bound.
double rhs() const
Get right-hand side.
OsiRowCut_inline void setUb(double ub)
Set upper bound.
virtual ~OsiRowCut()
Destructor.
virtual ~OsiRowCut2()
Destructor.
int getMinIndex() const
Get value of minimum index.
OsiRowCut & operator=(const OsiRowCut &rhs)
Assignment operator.
virtual OsiRowCut * clone() const
Clone.
virtual void print() const
Print cuts in collection.
virtual int getNumCols() const =0
Get the number of columns.
virtual OsiRowCut * clone() const
Clone.
Abstract Base Class for describing an interface to a solver.
double range() const
Get range (ub - lb for 'R' rows, 0 otherwise)
Row Cut Class which refers back to row which created it.
OsiRowCut_inline double ub() const
Get upper bound.
OsiRowCut_inline const CoinPackedVector & row() const
Get row elements.
#define COIN_DEFAULT_VALUE_FOR_DUPLICATE
char sense() const
Get sense ('E', 'G', 'L', 'N', 'R')
void setVector(int size, const int *inds, const double *elems, bool testForDuplicateIndex=COIN_DEFAULT_VALUE_FOR_DUPLICATE)
Set vector size, indices, and elements.
OsiRowCut_inline CoinPackedVector & mutableRow()
Get row elements for changing.
void operator-=(double value)
subtract value from every vector entry
void operator/=(double value)
divide every vector entry by value
OsiRowCut_inline void setRow(int size, const int *colIndices, const double *elements, bool testForDuplicateIndex=COIN_DEFAULT_VALUE_FOR_DUPLICATE)
Set row elements.
OsiRowCut_inline bool infeasible(const OsiSolverInterface &im) const
Returns true if the row cut itself is infeasible and cannot be satisfied.
virtual double violated(const double *solution) const
Returns infeasibility of the cut with respect to solution passed in i.e.
OsiRowCut()
Default Constructor.
void operator*=(double value)
multiply every vector entry by value
int whichRow() const
Get row.
void duplicateIndex(const char *methodName=NULL, const char *className=NULL) const
Throw an exception if there are duplicate indices.
void sortIncrIndex()
Allow access row sorting function.
OsiRowCut_inline bool consistent() const
Returns true if the cut is consistent.
OsiRowCut_inline void setLb(double lb)
Set lower bound.
CoinPackedVector row_
Row elements.
int getMaxIndex() const
Get value of maximum index.
OsiRowCut2 & operator=(const OsiRowCut2 &rhs)
Assignment operator.
OsiRowCut_inline bool operator==(const OsiRowCut &rhs) const
equal - true if lower bound, upper bound, row elements, and OsiCut are equal.
void setWhichRow(int row)
Set row.