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