Cbc
2.10.10
|
OsiRowCut augmented with bookkeeping. More...
#include <CbcCountRowCut.hpp>
Constructors & destructors | |
CbcNodeInfo * | owner_ |
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... | |
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... | |
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... | |
CbcCountRowCut (const CbcCountRowCut &) | |
Standard copy is illegal (reference counts would be incorrect) More... | |
CbcCountRowCut & | operator= (const CbcCountRowCut &rhs) |
Standard assignment is illegal (reference counts would be incorrect) More... | |
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.
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 |
|
private |
Standard copy is illegal (reference counts would be incorrect)
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.
|
inline |
Number of other CbcNodeInfo objects pointing to this row cut.
Definition at line 75 of file CbcCountRowCut.hpp.
|
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.
|
private |
Standard assignment is illegal (reference counts would be incorrect)
|
private |
Backward pointer to owning CbcNodeInfo.
Definition at line 102 of file CbcCountRowCut.hpp.
|
private |
Index of cut in owner's cut set (cuts_ ).
Definition at line 106 of file CbcCountRowCut.hpp.
|
private |
Number of other CbcNodeInfo objects pointing to this cut.
Definition at line 109 of file CbcCountRowCut.hpp.
|
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.