Cbc  2.10.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CbcCountRowCut Class Reference

OsiRowCut augmented with bookkeeping. More...

#include <CbcCountRowCut.hpp>

+ Inheritance diagram for CbcCountRowCut:
+ Collaboration diagram for CbcCountRowCut:

Public Member Functions

void increment (int change=1)
 Increment the number of references. More...
 
int decrement (int change=1)
 Decrement the number of references and return the number left. More...
 
void setInfo (CbcNodeInfo *, int whichOne)
 Set the information associating this cut with a node. More...
 
int numberPointingToThis ()
 Number of other CbcNodeInfo objects pointing to this row cut. More...
 
int whichCutGenerator () const
 Which generator for cuts - as user order. More...
 
bool canDropCut (const OsiSolverInterface *solver, int row) const
 Returns true if can drop cut if slack basic. More...
 
Constructors & destructors
 CbcCountRowCut ()
 Default Constructor. More...
 
 CbcCountRowCut (const OsiRowCut &)
 `Copy' constructor using an OsiRowCut More...
 
 CbcCountRowCut (const OsiRowCut &, CbcNodeInfo *, int whichOne, int whichGenerator=-1, int numberPointingToThis=0)
 `Copy' constructor using an OsiRowCut and an CbcNodeInfo More...
 
virtual ~CbcCountRowCut ()
 Destructor. More...
 
- Public Member Functions inherited from OsiRowCut
void sortIncrIndex ()
 Allow access row sorting function. More...
 
OsiRowCut_inline double lb () const
 Get lower bound. More...
 
OsiRowCut_inline void setLb (double lb)
 Set lower bound. More...
 
OsiRowCut_inline double ub () const
 Get upper bound. More...
 
OsiRowCut_inline void setUb (double ub)
 Set upper bound. More...
 
char sense () const
 Get sense ('E', 'G', 'L', 'N', 'R') More...
 
double rhs () const
 Get right-hand side. More...
 
double range () const
 Get range (ub - lb for 'R' rows, 0 otherwise) More...
 
OsiRowCut_inline void setRow (int size, const int *colIndices, const double *elements, bool testForDuplicateIndex=COIN_DEFAULT_VALUE_FOR_DUPLICATE)
 Set row elements. More...
 
OsiRowCut_inline void setRow (const CoinPackedVector &v)
 Set row elements from a packed vector. More...
 
OsiRowCut_inline const
CoinPackedVector
row () const
 Get row elements. More...
 
OsiRowCut_inline CoinPackedVectormutableRow ()
 Get row elements for changing. More...
 
OsiRowCut_inline bool operator== (const OsiRowCut &rhs) const
 equal - true if lower bound, upper bound, row elements, and OsiCut are equal. More...
 
OsiRowCut_inline bool operator!= (const OsiRowCut &rhs) const
 not equal More...
 
OsiRowCut_inline bool consistent () const
 Returns true if the cut is consistent. More...
 
OsiRowCut_inline bool consistent (const OsiSolverInterface &im) const
 Returns true if cut is consistent with respect to the solver interface's model. More...
 
OsiRowCut_inline bool infeasible (const OsiSolverInterface &im) const
 Returns true if the row cut itself is infeasible and cannot be satisfied. More...
 
virtual double violated (const double *solution) const
 Returns infeasibility of the cut with respect to solution passed in i.e. More...
 
void operator+= (double value)
 add value to every vector entry More...
 
void operator-= (double value)
 subtract value from every vector entry More...
 
void operator*= (double value)
 multiply every vector entry by value More...
 
void operator/= (double value)
 divide every vector entry by value More...
 
OsiRowCutoperator= (const OsiRowCut &rhs)
 Assignment operator. More...
 
 OsiRowCut (const OsiRowCut &)
 Copy constructor. More...
 
virtual OsiRowCutclone () const
 Clone. More...
 
 OsiRowCut ()
 Default Constructor. More...
 
 OsiRowCut (double cutlb, double cutub, int capacity, int size, int *&colIndices, double *&elements)
 Ownership Constructor. More...
 
virtual ~OsiRowCut ()
 Destructor. More...
 
virtual void print () const
 Print cuts in collection. More...
 
- Public Member Functions inherited from OsiCut
void setEffectiveness (double e)
 Set effectiveness. More...
 
double effectiveness () const
 Get effectiveness. More...
 
void setGloballyValid (bool trueFalse)
 Set globallyValid (nonzero true) More...
 
void setGloballyValid ()
 
void setNotGloballyValid ()
 
bool globallyValid () const
 Get globallyValid. More...
 
void setGloballyValidAsInteger (int trueFalse)
 Set globallyValid as integer (nonzero true) More...
 
int globallyValidAsInteger () const
 Get globallyValid. More...
 
virtual bool operator== (const OsiCut &rhs) const
 equal. 2 cuts are equal if there effectiveness are equal More...
 
virtual bool operator!= (const OsiCut &rhs) const
 not equal More...
 
virtual bool operator< (const OsiCut &rhs) const
 less than. True if this.effectiveness < rhs.effectiveness More...
 
virtual bool operator> (const OsiCut &rhs) const
 less than. True if this.effectiveness > rhs.effectiveness More...
 

Private Member Functions

 CbcCountRowCut (const CbcCountRowCut &)
 Standard copy is illegal (reference counts would be incorrect) More...
 
CbcCountRowCutoperator= (const CbcCountRowCut &rhs)
 Standard assignment is illegal (reference counts would be incorrect) More...
 

Private Attributes

CbcNodeInfoowner_
 Backward pointer to owning CbcNodeInfo. More...
 
int ownerCut_
 Index of cut in owner's cut set (cuts_ ). More...
 
int numberPointingToThis_
 Number of other CbcNodeInfo objects pointing to this cut. More...
 
int whichCutGenerator_
 Which generator created this cut (add 10000 if globally valid) if -1 then from global cut pool -2 cut branch -3 unknown. More...
 

Additional Inherited Members

- Protected Member Functions inherited from OsiCut
 OsiCut ()
 Default Constructor. More...
 
 OsiCut (const OsiCut &)
 Copy constructor. More...
 
OsiCutoperator= (const OsiCut &rhs)
 Assignment operator. More...
 
virtual ~OsiCut ()
 Destructor. More...
 

Detailed Description

OsiRowCut augmented with bookkeeping.

CbcCountRowCut is an OsiRowCut object augmented with bookkeeping information: a reference count and information that specifies the the generator that created the cut and the node to which it's associated.

The general principles for handling the reference count are as follows:

When all possible uses of a cut have been demonstrated to be unnecessary, the reference count (numberPointingToThis_) will fall to zero. The CbcCountRowCut object (and its included OsiRowCut object) are then deleted.

Definition at line 34 of file CbcCountRowCut.hpp.

Constructor & Destructor Documentation

CbcCountRowCut::CbcCountRowCut ( )

Default Constructor.

CbcCountRowCut::CbcCountRowCut ( const OsiRowCut )

`Copy' constructor using an OsiRowCut

CbcCountRowCut::CbcCountRowCut ( const OsiRowCut ,
CbcNodeInfo ,
int  whichOne,
int  whichGenerator = -1,
int  numberPointingToThis = 0 
)

`Copy' constructor using an OsiRowCut and an CbcNodeInfo

virtual CbcCountRowCut::~CbcCountRowCut ( )
virtual

Destructor.

Note
The destructor will reach out (via owner_) and NULL the reference to the cut in the owner's cuts_ list.
CbcCountRowCut::CbcCountRowCut ( const CbcCountRowCut )
private

Standard copy is illegal (reference counts would be incorrect)

Member Function Documentation

void CbcCountRowCut::increment ( int  change = 1)

Increment the number of references.

int CbcCountRowCut::decrement ( int  change = 1)

Decrement the number of references and return the number left.

void CbcCountRowCut::setInfo ( CbcNodeInfo ,
int  whichOne 
)

Set the information associating this cut with a node.

An CbcNodeInfo object and an index in the cut set of the node. For locally valid cuts, the node will be the search tree node where the cut was generated. For globally valid cuts, it's the node where the cut was activated.

int CbcCountRowCut::numberPointingToThis ( )
inline

Number of other CbcNodeInfo objects pointing to this row cut.

Definition at line 75 of file CbcCountRowCut.hpp.

int CbcCountRowCut::whichCutGenerator ( ) const
inline

Which generator for cuts - as user order.

Definition at line 81 of file CbcCountRowCut.hpp.

bool CbcCountRowCut::canDropCut ( const OsiSolverInterface solver,
int  row 
) const

Returns true if can drop cut if slack basic.

CbcCountRowCut& CbcCountRowCut::operator= ( const CbcCountRowCut rhs)
private

Standard assignment is illegal (reference counts would be incorrect)

Member Data Documentation

CbcNodeInfo* CbcCountRowCut::owner_
private

Backward pointer to owning CbcNodeInfo.

Definition at line 102 of file CbcCountRowCut.hpp.

int CbcCountRowCut::ownerCut_
private

Index of cut in owner's cut set (cuts_ ).

Definition at line 106 of file CbcCountRowCut.hpp.

int CbcCountRowCut::numberPointingToThis_
private

Number of other CbcNodeInfo objects pointing to this cut.

Definition at line 109 of file CbcCountRowCut.hpp.

int CbcCountRowCut::whichCutGenerator_
private

Which generator created this cut (add 10000 if globally valid) if -1 then from global cut pool -2 cut branch -3 unknown.

Definition at line 117 of file CbcCountRowCut.hpp.


The documentation for this class was generated from the following file: