#include <CbcTree.hpp>
Public Member Functions | |
CbcTree () | |
CbcTree (const CbcTree &rhs) | |
CbcTree & | operator= (const CbcTree &rhs) |
virtual | ~CbcTree () |
virtual CbcTree * | clone () const |
Clone. | |
virtual void | generateCpp (FILE *) |
Create C++ lines to get to current state. | |
CbcTree () | |
CbcTree (const CbcTree &rhs) | |
CbcTree & | operator= (const CbcTree &rhs) |
virtual | ~CbcTree () |
virtual CbcTree * | clone () const |
Clone. | |
virtual void | generateCpp (FILE *) |
Create C++ lines to get to current state. | |
Heap access and maintenance methods | |
void | setComparison (CbcCompareBase &compare) |
Set comparison function and resort heap. | |
virtual CbcNode * | top () const |
Return the top node of the heap. | |
virtual void | push (CbcNode *x) |
Add a node to the heap. | |
virtual void | pop () |
Remove the top node from the heap. | |
virtual CbcNode * | bestNode (double cutoff) |
Gets best node and takes off heap. | |
void | setComparison (CbcCompareBase &compare) |
Set comparison function and resort heap. | |
virtual CbcNode * | top () const |
Return the top node of the heap. | |
virtual void | push (CbcNode *x) |
Add a node to the heap. | |
virtual void | pop () |
Remove the top node from the heap. | |
virtual CbcNode * | bestNode (double cutoff) |
Gets best node and takes off heap. | |
vector methods | |
virtual bool | empty () |
Test if empty *** note may be overridden. | |
virtual int | size () const |
Return size. | |
CbcNode * | operator[] (int i) const |
[] operator | |
CbcNode * | nodePointer (int i) const |
Return a node pointer. | |
virtual bool | empty () |
Test if empty *** note may be overridden. | |
virtual int | size () const |
Return size. | |
CbcNode * | operator[] (int i) const |
[] operator | |
CbcNode * | nodePointer (int i) const |
Return a node pointer. | |
Search tree maintenance | |
virtual void | cleanTree (CbcModel *model, double cutoff, double &bestPossibleObjective) |
Prune the tree using an objective function cutoff. | |
CbcNode * | bestAlternate () |
Get best on list using alternate method. | |
virtual void | endSearch () |
We may have got an intelligent tree so give it one more chance. | |
virtual double | getBestPossibleObjective () |
Get best possible objective function in the tree. | |
void | resetNodeNumbers () |
Reset maximum node number. | |
int | maximumNodeNumber () const |
Get maximum node number. | |
void | setNumberBranching (int value) |
Set number of branches. | |
int | getNumberBranching () const |
Get number of branches. | |
void | setMaximumBranching (int value) |
Set maximum branches. | |
int | getMaximumBranching () const |
Get maximum branches. | |
unsigned int * | branched () const |
Get branched variables. | |
int * | newBounds () const |
Get bounds. | |
void | addBranchingInformation (const CbcModel *model, const CbcNodeInfo *nodeInfo, const double *currentLower, const double *currentUpper) |
Adds branching information to complete state. | |
void | increaseSpace () |
Increase space for data. | |
virtual void | cleanTree (CbcModel *model, double cutoff, double &bestPossibleObjective) |
Prune the tree using an objective function cutoff. | |
CbcNode * | bestAlternate () |
Get best on list using alternate method. | |
virtual void | endSearch () |
We may have got an intelligent tree so give it one more chance. | |
virtual double | getBestPossibleObjective () |
Get best possible objective function in the tree. | |
void | resetNodeNumbers () |
Reset maximum node number. | |
int | maximumNodeNumber () const |
Get maximum node number. | |
void | setNumberBranching (int value) |
Set number of branches. | |
int | getNumberBranching () const |
Get number of branches. | |
void | setMaximumBranching (int value) |
Set maximum branches. | |
int | getMaximumBranching () const |
Get maximum branches. | |
unsigned int * | branched () const |
Get branched variables. | |
int * | newBounds () const |
Get bounds. | |
void | addBranchingInformation (const CbcModel *model, const CbcNodeInfo *nodeInfo, const double *currentLower, const double *currentUpper) |
Adds branching information to complete state. | |
void | increaseSpace () |
Increase space for data. |
Protected Attributes | |
std::vector< CbcNode * > | nodes_ |
CbcCompare | comparison_ |
int | maximumNodeNumber_ |
| |
int | numberBranching_ |
Size of variable list. | |
int | maximumBranching_ |
Maximum size of variable list. | |
unsigned int * | branched_ |
Integer variables branched or bounded top bit set if new upper bound next bit set if a branch. | |
int * | newBound_ |
New bound. |
Definition at line 25 of file CbcTree.hpp.
CbcTree::CbcTree | ( | ) |
CbcTree::CbcTree | ( | const CbcTree & | rhs | ) |
|
virtual |
CbcTree::CbcTree | ( | ) |
CbcTree::CbcTree | ( | const CbcTree & | rhs | ) |
|
virtual |
|
virtual |
Clone.
Reimplemented in CbcTreeVariable, CbcTreeVariable, CbcTreeLocal, and CbcTreeLocal.
|
inlinevirtual |
Create C++ lines to get to current state.
Reimplemented in CbcTreeVariable, CbcTreeVariable, CbcTreeLocal, and CbcTreeLocal.
Definition at line 42 of file CbcTree.hpp.
void CbcTree::setComparison | ( | CbcCompareBase & | compare | ) |
Set comparison function and resort heap.
|
virtual |
Return the top node of the heap.
Reimplemented in CbcTreeVariable, CbcTreeVariable, CbcTreeLocal, and CbcTreeLocal.
|
virtual |
Add a node to the heap.
Reimplemented in CbcTreeVariable, CbcTreeVariable, CbcTreeLocal, and CbcTreeLocal.
|
virtual |
Remove the top node from the heap.
Reimplemented in CbcTreeVariable, CbcTreeVariable, CbcTreeLocal, and CbcTreeLocal.
|
virtual |
Gets best node and takes off heap.
|
virtual |
Test if empty *** note may be overridden.
Reimplemented in CbcTreeVariable, CbcTreeVariable, CbcTreeLocal, and CbcTreeLocal.
|
inlinevirtual |
Return size.
Definition at line 69 of file CbcTree.hpp.
|
inline |
[] operator
Definition at line 73 of file CbcTree.hpp.
|
inline |
Return a node pointer.
Definition at line 78 of file CbcTree.hpp.
|
virtual |
Prune the tree using an objective function cutoff.
This routine removes all nodes with objective worst than the specified cutoff value. It also sets bestPossibleObjective to best of all on tree before deleting.
CbcNode* CbcTree::bestAlternate | ( | ) |
Get best on list using alternate method.
|
inlinevirtual |
We may have got an intelligent tree so give it one more chance.
Reimplemented in CbcTreeVariable, CbcTreeVariable, CbcTreeLocal, and CbcTreeLocal.
Definition at line 102 of file CbcTree.hpp.
|
virtual |
Get best possible objective function in the tree.
|
inline |
Reset maximum node number.
Definition at line 107 of file CbcTree.hpp.
|
inline |
Get maximum node number.
Definition at line 111 of file CbcTree.hpp.
|
inline |
Set number of branches.
Definition at line 115 of file CbcTree.hpp.
|
inline |
Get number of branches.
Definition at line 119 of file CbcTree.hpp.
|
inline |
Set maximum branches.
Definition at line 123 of file CbcTree.hpp.
|
inline |
Get maximum branches.
Definition at line 127 of file CbcTree.hpp.
|
inline |
Get branched variables.
Definition at line 131 of file CbcTree.hpp.
|
inline |
Get bounds.
Definition at line 135 of file CbcTree.hpp.
void CbcTree::addBranchingInformation | ( | const CbcModel * | model, |
const CbcNodeInfo * | nodeInfo, | ||
const double * | currentLower, | ||
const double * | currentUpper | ||
) |
Adds branching information to complete state.
void CbcTree::increaseSpace | ( | ) |
Increase space for data.
|
virtual |
Clone.
Reimplemented in CbcTreeVariable, CbcTreeVariable, CbcTreeLocal, and CbcTreeLocal.
|
inlinevirtual |
Create C++ lines to get to current state.
Reimplemented in CbcTreeVariable, CbcTreeVariable, CbcTreeLocal, and CbcTreeLocal.
Definition at line 42 of file CbcTree.hpp.
void CbcTree::setComparison | ( | CbcCompareBase & | compare | ) |
Set comparison function and resort heap.
|
virtual |
Return the top node of the heap.
Reimplemented in CbcTreeVariable, CbcTreeVariable, CbcTreeLocal, and CbcTreeLocal.
|
virtual |
Add a node to the heap.
Reimplemented in CbcTreeVariable, CbcTreeVariable, CbcTreeLocal, and CbcTreeLocal.
|
virtual |
Remove the top node from the heap.
Reimplemented in CbcTreeVariable, CbcTreeVariable, CbcTreeLocal, and CbcTreeLocal.
|
virtual |
Gets best node and takes off heap.
|
virtual |
Test if empty *** note may be overridden.
Reimplemented in CbcTreeVariable, CbcTreeVariable, CbcTreeLocal, and CbcTreeLocal.
|
inlinevirtual |
Return size.
Definition at line 69 of file CbcTree.hpp.
|
inline |
[] operator
Definition at line 73 of file CbcTree.hpp.
|
inline |
Return a node pointer.
Definition at line 78 of file CbcTree.hpp.
|
virtual |
Prune the tree using an objective function cutoff.
This routine removes all nodes with objective worst than the specified cutoff value. It also sets bestPossibleObjective to best of all on tree before deleting.
CbcNode* CbcTree::bestAlternate | ( | ) |
Get best on list using alternate method.
|
inlinevirtual |
We may have got an intelligent tree so give it one more chance.
Reimplemented in CbcTreeVariable, CbcTreeVariable, CbcTreeLocal, and CbcTreeLocal.
Definition at line 102 of file CbcTree.hpp.
|
virtual |
Get best possible objective function in the tree.
|
inline |
Reset maximum node number.
Definition at line 107 of file CbcTree.hpp.
|
inline |
Get maximum node number.
Definition at line 111 of file CbcTree.hpp.
|
inline |
Set number of branches.
Definition at line 115 of file CbcTree.hpp.
|
inline |
Get number of branches.
Definition at line 119 of file CbcTree.hpp.
|
inline |
Set maximum branches.
Definition at line 123 of file CbcTree.hpp.
|
inline |
Get maximum branches.
Definition at line 127 of file CbcTree.hpp.
|
inline |
Get branched variables.
Definition at line 131 of file CbcTree.hpp.
|
inline |
Get bounds.
Definition at line 135 of file CbcTree.hpp.
void CbcTree::addBranchingInformation | ( | const CbcModel * | model, |
const CbcNodeInfo * | nodeInfo, | ||
const double * | currentLower, | ||
const double * | currentUpper | ||
) |
Adds branching information to complete state.
void CbcTree::increaseSpace | ( | ) |
Increase space for data.
|
protected |
Definition at line 146 of file CbcTree.hpp.
|
protected |
Definition at line 147 of file CbcTree.hpp.
|
protected |
Sort function for heap ordering.
Maximum "node" number so far to split ties
Definition at line 149 of file CbcTree.hpp.
|
protected |
Size of variable list.
Definition at line 151 of file CbcTree.hpp.
|
protected |
Maximum size of variable list.
Definition at line 153 of file CbcTree.hpp.
|
protected |
Integer variables branched or bounded top bit set if new upper bound next bit set if a branch.
Definition at line 158 of file CbcTree.hpp.
|
protected |
New bound.
Definition at line 160 of file CbcTree.hpp.