#include <CbcTree.hpp>
Inheritance diagram for CbcTree:
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. | |
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. | |
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_ |
Maximum "node" number so far to split ties. | |
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 23 of file CbcTree.hpp.
CbcTree::CbcTree | ( | ) |
CbcTree::CbcTree | ( | const CbcTree & | rhs | ) |
virtual CbcTree::~CbcTree | ( | ) | [virtual] |
virtual CbcTree* CbcTree::clone | ( | ) | const [virtual] |
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 | ) |
virtual CbcNode* CbcTree::top | ( | ) | const [virtual] |
virtual void CbcTree::push | ( | CbcNode * | x | ) | [virtual] |
virtual void CbcTree::pop | ( | ) | [virtual] |
virtual CbcNode* CbcTree::bestNode | ( | double | cutoff | ) | [virtual] |
virtual bool CbcTree::empty | ( | ) | [virtual] |
virtual int CbcTree::size | ( | ) | const [inline, virtual] |
Return size.
Reimplemented in CbcNewTree.
Definition at line 67 of file CbcTree.hpp.
References nodes_.
CbcNode* CbcTree::operator[] | ( | int | i | ) | const [inline] |
[] operator
Reimplemented in CbcNewTree.
Definition at line 70 of file CbcTree.hpp.
References nodes_.
CbcNode* CbcTree::nodePointer | ( | int | i | ) | const [inline] |
Return a node pointer.
Reimplemented in CbcNewTree.
Definition at line 74 of file CbcTree.hpp.
References nodes_.
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 | ( | ) |
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 97 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 102 of file CbcTree.hpp.
References maximumNodeNumber_.
void CbcTree::setNumberBranching | ( | int | value | ) | [inline] |
int CbcTree::getNumberBranching | ( | ) | const [inline] |
void CbcTree::setMaximumBranching | ( | int | value | ) | [inline] |
int CbcTree::getMaximumBranching | ( | ) | const [inline] |
unsigned int* CbcTree::branched | ( | ) | const [inline] |
int* CbcTree::newBounds | ( | ) | const [inline] |
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.
std::vector<CbcNode *> CbcTree::nodes_ [protected] |
Definition at line 130 of file CbcTree.hpp.
Referenced by CbcNewTree::nodePointer(), nodePointer(), CbcNewTree::operator[](), operator[](), CbcNewTree::size(), and size().
CbcCompare CbcTree::comparison_ [protected] |
Definition at line 131 of file CbcTree.hpp.
int CbcTree::maximumNodeNumber_ [protected] |
Maximum "node" number so far to split ties.
Definition at line 133 of file CbcTree.hpp.
Referenced by resetNodeNumbers().
int CbcTree::numberBranching_ [protected] |
Size of variable list.
Definition at line 135 of file CbcTree.hpp.
Referenced by getNumberBranching(), and setNumberBranching().
int CbcTree::maximumBranching_ [protected] |
Maximum size of variable list.
Definition at line 137 of file CbcTree.hpp.
Referenced by getMaximumBranching(), and setMaximumBranching().
unsigned int* CbcTree::branched_ [protected] |
Integer variables branched or bounded top bit set if new upper bound next bit set if a branch.
Definition at line 142 of file CbcTree.hpp.
Referenced by branched().
int* CbcTree::newBound_ [protected] |