CbcTree Class Reference

#include <CbcTree.hpp>

Inheritance diagram for CbcTree:
CbcNewTree CbcTreeArray CbcTreeLocal CbcTreeVariable

List of all members.

Public Member Functions

 CbcTree ()
 CbcTree (const CbcTree &rhs)
CbcTreeoperator= (const CbcTree &rhs)
virtual ~CbcTree ()
virtual CbcTreeclone () 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 CbcNodetop () 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 CbcNodebestNode (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.
CbcNodeoperator[] (int i) const
 [] operator
CbcNodenodePointer (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.
CbcNodebestAlternate ()
 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_
 > Sort function for heap ordering.
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.

Detailed Description

Definition at line 24 of file CbcTree.hpp.


Constructor & Destructor Documentation

CbcTree::CbcTree (  ) 
CbcTree::CbcTree ( const CbcTree rhs  ) 
virtual CbcTree::~CbcTree (  )  [virtual]

Member Function Documentation

CbcTree& CbcTree::operator= ( const CbcTree rhs  ) 
virtual CbcTree* CbcTree::clone (  )  const [virtual]

Clone.

Reimplemented in CbcTreeArray, CbcNewTree, CbcTreeLocal, and CbcTreeVariable.

virtual void CbcTree::generateCpp ( FILE *   )  [inline, virtual]

Create C++ lines to get to current state.

Reimplemented in CbcTreeArray, CbcNewTree, CbcTreeLocal, and CbcTreeVariable.

Definition at line 41 of file CbcTree.hpp.

void CbcTree::setComparison ( CbcCompareBase compare  ) 

Set comparison function and resort heap.

Reimplemented in CbcTreeArray, and CbcNewTree.

virtual CbcNode* CbcTree::top (  )  const [virtual]

Return the top node of the heap.

Reimplemented in CbcNewTree, CbcTreeLocal, and CbcTreeVariable.

virtual void CbcTree::push ( CbcNode x  )  [virtual]

Add a node to the heap.

Reimplemented in CbcTreeArray, CbcNewTree, CbcTreeLocal, and CbcTreeVariable.

virtual void CbcTree::pop (  )  [virtual]

Remove the top node from the heap.

Reimplemented in CbcNewTree, CbcTreeLocal, and CbcTreeVariable.

virtual CbcNode* CbcTree::bestNode ( double  cutoff  )  [virtual]

Gets best node and takes off heap.

Reimplemented in CbcTreeArray, and CbcNewTree.

virtual bool CbcTree::empty (  )  [virtual]

Test if empty *** note may be overridden.

Reimplemented in CbcTreeArray, CbcNewTree, CbcTreeLocal, and CbcTreeVariable.

virtual int CbcTree::size (  )  const [inline, virtual]

Return size.

Reimplemented in CbcNewTree.

Definition at line 68 of file CbcTree.hpp.

CbcNode* CbcTree::operator[] ( int  i  )  const [inline]

[] operator

Reimplemented in CbcNewTree.

Definition at line 71 of file CbcTree.hpp.

CbcNode* CbcTree::nodePointer ( int  i  )  const [inline]

Return a node pointer.

Reimplemented in CbcNewTree.

Definition at line 75 of file CbcTree.hpp.

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 CbcTreeArray, and 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, CbcTreeLocal, and CbcTreeVariable.

Definition at line 98 of file CbcTree.hpp.

virtual double CbcTree::getBestPossibleObjective (  )  [virtual]

Get best possible objective function in the tree.

Reimplemented in CbcTreeArray.

void CbcTree::resetNodeNumbers (  )  [inline]

Reset maximum node number.

Definition at line 103 of file CbcTree.hpp.

void CbcTree::setNumberBranching ( int  value  )  [inline]

Set number of branches.

Definition at line 106 of file CbcTree.hpp.

int CbcTree::getNumberBranching (  )  const [inline]

Get number of branches.

Definition at line 109 of file CbcTree.hpp.

void CbcTree::setMaximumBranching ( int  value  )  [inline]

Set maximum branches.

Definition at line 112 of file CbcTree.hpp.

int CbcTree::getMaximumBranching (  )  const [inline]

Get maximum branches.

Definition at line 115 of file CbcTree.hpp.

unsigned int* CbcTree::branched (  )  const [inline]

Get branched variables.

Definition at line 118 of file CbcTree.hpp.

int* CbcTree::newBounds (  )  const [inline]

Get bounds.

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


Member Data Documentation

std::vector<CbcNode *> CbcTree::nodes_ [protected]

Definition at line 131 of file CbcTree.hpp.

Definition at line 132 of file CbcTree.hpp.

int CbcTree::maximumNodeNumber_ [protected]

> Sort function for heap ordering.

Maximum "node" number so far to split ties

Definition at line 134 of file CbcTree.hpp.

int CbcTree::numberBranching_ [protected]

Size of variable list.

Definition at line 136 of file CbcTree.hpp.

int CbcTree::maximumBranching_ [protected]

Maximum size of variable list.

Definition at line 138 of file CbcTree.hpp.

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 143 of file CbcTree.hpp.

int* CbcTree::newBound_ [protected]

New bound.

Definition at line 145 of file CbcTree.hpp.


The documentation for this class was generated from the following file:
Generated on Fri May 28 17:17:32 2010 by  doxygen 1.6.3