# CbcCountRowCut Class Reference

OsiRowCut augmented with bookkeeping. More...

`#include <CbcCountRowCut.hpp>`

Inheritance diagram for CbcCountRowCut:
[legend]
Collaboration diagram for CbcCountRowCut:
[legend]

List of all members.

## Public Member Functions
void | increment (int change=1)
| Increment the number of references.
int | decrement (int change=1)
| Decrement the number of references and return the number left.
void | setInfo (CbcNodeInfo *, int whichOne)
| Set the information associating this cut with a node.
int | numberPointingToThis ()
| Number of other CbcNodeInfo objects pointing to this row cut.
int | whichCutGenerator () const
| Which generator for cuts - as user order.
bool | canDropCut (const OsiSolverInterface *solver, int row) const
| Returns true if can drop cut if slack basic.
Constructors & destructors
| CbcCountRowCut ()
| Default Constructor.
| CbcCountRowCut (const OsiRowCut &)
| `Copy' constructor using an OsiRowCut
| CbcCountRowCut (const OsiRowCut &, CbcNodeInfo *, int whichOne, int whichGenerator=-1, int numberPointingToThis=0)
| `Copy' constructor using an OsiRowCut and an CbcNodeInfo
virtual | ~CbcCountRowCut ()
| Destructor.
## Private Member Functions
| CbcCountRowCut (const CbcCountRowCut &)
| Standard copy is illegal (reference counts would be incorrect).
CbcCountRowCut & | operator= (const CbcCountRowCut &rhs)
| Standard assignment is illegal (reference counts would be incorrect).
## Private Attributes
CbcNodeInfo * | owner_
| Backward pointer to owning CbcNodeInfo.
int | ownerCut_
| Index of cut in owner's cut set (cuts_ ).
int | numberPointingToThis_
| Number of other CbcNodeInfo objects pointing to this cut.
int | whichCutGenerator_
| Which generator created this cut.

## 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:

- Once it's determined how the node will branch, increment the reference count under the assumption that all children will use all cuts currently tight at the node and will survive to be placed in the search tree.
- As this assumption is proven incorrect (a cut becomes loose, or a child is fathomed), decrement the reference count accordingly.

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

int CbcCountRowCut::whichCutGenerator | ( |  | ) | const`[inline]`

Which generator for cuts - as user order.

Definition at line 82 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).

Reimplemented from OsiRowCut.

## Member Data Documentation

CbcNodeInfo* CbcCountRowCut::owner_`[private]`

Backward pointer to owning CbcNodeInfo.

Definition at line 103 of file CbcCountRowCut.hpp.

int CbcCountRowCut::ownerCut_`[private]`

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

Definition at line 107 of file CbcCountRowCut.hpp.

int CbcCountRowCut::numberPointingToThis_`[private]`

Number of other CbcNodeInfo objects pointing to this cut.

Definition at line 110 of file CbcCountRowCut.hpp.

int CbcCountRowCut::whichCutGenerator_`[private]`

Which generator created this cut.

Definition at line 113 of file CbcCountRowCut.hpp.

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

- /home/coin/svn-release/Cbc-2.7.7/Cbc/src/CbcCountRowCut.hpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines