#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 *fp) |
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. | |
vector methods | |
virtual bool | empty () |
Test if empty *** note may be overridden. | |
virtual int | size () const |
Return size. | |
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. | |
Protected Attributes | |
std::vector< CbcNode * > | nodes_ |
CbcCompare | comparison_ |
int | maximumNodeNumber_ |
> Sort function for heap ordering. |
Definition at line 23 of file CbcTree.hpp.
CbcTree::CbcTree | ( | ) |
CbcTree::CbcTree | ( | const CbcTree & | rhs | ) |
virtual CbcTree::~CbcTree | ( | ) | [virtual] |
Reimplemented in CbcNewTree, and CbcTreeLocal.
virtual CbcTree* CbcTree::clone | ( | ) | const [virtual] |
Clone.
Reimplemented in CbcNewTree, and CbcTreeLocal.
virtual void CbcTree::generateCpp | ( | FILE * | fp | ) | [inline, virtual] |
Create C++ lines to get to current state.
Reimplemented in CbcNewTree, and CbcTreeLocal.
Definition at line 40 of file CbcTree.hpp.
void CbcTree::setComparison | ( | CbcCompareBase & | compare | ) |
Set comparison function and resort heap.
Reimplemented in CbcNewTree.
virtual CbcNode* CbcTree::top | ( | ) | const [virtual] |
Return the top node of the heap.
Reimplemented in CbcNewTree, and CbcTreeLocal.
virtual void CbcTree::push | ( | CbcNode * | x | ) | [virtual] |
Add a node to the heap.
Reimplemented in CbcNewTree, and CbcTreeLocal.
virtual void CbcTree::pop | ( | ) | [virtual] |
Remove the top node from the heap.
Reimplemented in CbcNewTree, and CbcTreeLocal.
virtual CbcNode* CbcTree::bestNode | ( | double | cutoff | ) | [virtual] |
Gets best node and takes off heap.
Reimplemented in CbcNewTree.
virtual bool CbcTree::empty | ( | ) | [virtual] |
Test if empty *** note may be overridden.
Reimplemented in CbcNewTree, and CbcTreeLocal.
virtual int CbcTree::size | ( | ) | const [inline, virtual] |
virtual void CbcTree::cleanTree | ( | CbcModel * | model, | |
double | cutoff, | |||
double & | bestPossibleObjective | |||
) | [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.
Reimplemented in CbcNewTree.
CbcNode* CbcTree::bestAlternate | ( | ) |
Get best on list using alternate method.
Reimplemented in CbcNewTree.
virtual void CbcTree::endSearch | ( | ) | [inline, virtual] |
We may have got an intelligent tree so give it one more chance.
Reimplemented in CbcNewTree, and CbcTreeLocal.
Definition at line 89 of file CbcTree.hpp.
virtual double CbcTree::getBestPossibleObjective | ( | ) | [virtual] |
Get best possible objective function in the tree.
void CbcTree::resetNodeNumbers | ( | ) | [inline] |
Reset maximum node number.
Definition at line 94 of file CbcTree.hpp.
std::vector<CbcNode *> CbcTree::nodes_ [protected] |
Definition at line 98 of file CbcTree.hpp.
CbcCompare CbcTree::comparison_ [protected] |
Definition at line 99 of file CbcTree.hpp.
int CbcTree::maximumNodeNumber_ [protected] |
> Sort function for heap ordering.
Maximum "node" number so far to split ties
Definition at line 101 of file CbcTree.hpp.