Cbc  2.9.8
Public Member Functions | 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...
 

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 35 of file CbcCountRowCut.hpp.

Constructor & Destructor Documentation

◆ CbcCountRowCut() [1/3]

CbcCountRowCut::CbcCountRowCut ( )

Default Constructor.

◆ CbcCountRowCut() [2/3]

CbcCountRowCut::CbcCountRowCut ( const OsiRowCut &  )

`Copy' constructor using an OsiRowCut

◆ CbcCountRowCut() [3/3]

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

`Copy' constructor using an OsiRowCut and an CbcNodeInfo

◆ ~CbcCountRowCut()

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.

Member Function Documentation

◆ increment()

void CbcCountRowCut::increment ( int  change = 1)

Increment the number of references.

◆ decrement()

int CbcCountRowCut::decrement ( int  change = 1)

Decrement the number of references and return the number left.

◆ setInfo()

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.

◆ numberPointingToThis()

int CbcCountRowCut::numberPointingToThis ( )
inline

Number of other CbcNodeInfo objects pointing to this row cut.

Definition at line 77 of file CbcCountRowCut.hpp.

◆ whichCutGenerator()

int CbcCountRowCut::whichCutGenerator ( ) const
inline

Which generator for cuts - as user order.

Definition at line 82 of file CbcCountRowCut.hpp.

◆ canDropCut()

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

Returns true if can drop cut if slack basic.


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