30 #if defined(_MSC_VER) || defined(__MNO_CYGWIN)
33 #if 1 //ndef CBC_DUBIOUS_HEAP
104 virtual bool empty();
108 virtual int size()
const {
return static_cast< int >(
nodes_.size()); }
129 virtual void cleanTree(
CbcModel *model,
double cutoff,
double &bestPossibleObjective);
181 const double *currentLower,
182 const double *currentUpper);
187 #if CBC_DEBUG_HEAP > 0
221 #ifdef JJF_ZERO // not used
226 class CbcTreeArray :
public CbcTree {
233 CbcTreeArray(
const CbcTreeArray &rhs);
235 CbcTreeArray &
operator=(
const CbcTreeArray &rhs);
237 virtual ~CbcTreeArray();
261 virtual bool empty();
305 CbcNewTree(
const CbcNewTree &rhs);
307 CbcNewTree &
operator=(
const CbcNewTree &rhs);
309 virtual ~CbcNewTree();
312 virtual CbcNewTree *
clone()
const;
338 virtual bool empty();
341 inline int size()
const
343 return nodes_.size();
431 inline int size()
const
448 virtual bool empty();
484 std::vector< CbcNode * >
nodes_;
virtual double getBestPossibleObjective()
Get best possible objective function in the tree.
unsigned int * branched() const
Get branched variables.
CbcNode * operator[](int i) const
Return a node pointer.
CbcCompare comparison_
Sort predicate for heap ordering.
int getMaximumBranching() const
Get maximum branches.
virtual int size() const
Return size.
int lastUnsatisfied_
Number unsatisfied of last node pushed on tree.
void fixTop()
After changing data in the top node, fix the heap.
virtual CbcNode * bestNode(double cutoff)
Gets best node and takes off heap.
double lastObjective_
Objective of last node pushed on tree.
int maximumBranching_
Maximum size of variable list.
int lastUnsatisfied() const
Last number of objects unsatisfied.
virtual void generateCpp(FILE *)
Create C++ lines to get to current state.
void realpop()
Test for an empty tree.
virtual bool empty()
Test for an empty tree.
void setComparison(CbcCompareBase &compare)
Set comparison function and resort heap.
int * newBounds() const
Get bounds.
Information required to recreate the subproblem at this node.
CbcTree & operator=(const CbcTree &rhs)
= operator
int maximumNodeNumber_
Maximum "node" number so far to split ties.
void resetNodeNumbers()
Reset maximum node number.
virtual void endSearch()
We may have got an intelligent tree so give it one more chance.
CbcTree()
Default Constructor.
void addBranchingInformation(const CbcModel *model, const CbcNodeInfo *nodeInfo, const double *currentLower, const double *currentUpper)
Adds branching information to complete state.
virtual CbcTree * clone() const
Clone.
virtual void rebuild()
Rebuild the heap.
virtual void pop()
Remove the top node from the heap.
void increaseSpace()
Increase space for data.
CbcNode * bestAlternate()
Get best on list using alternate method.
virtual void push(CbcNode *x)
Add a node to the heap.
unsigned int * branched_
Integer variables branched or bounded top bit set if new upper bound next bit set if a branch...
int getNumberBranching() const
Get number of branches.
int lastDepth_
Depth of last node pushed on tree.
virtual CbcNode * top() const
Return the top node of the heap.
int * newBound_
New bound.
void setNumberBranching(int value)
Set number of branches.
void setMaximumBranching(int value)
Set maximum branches.
virtual void cleanTree(CbcModel *model, double cutoff, double &bestPossibleObjective)
Prune the tree using an objective function cutoff.
Information required while the node is live.
Using MS heap implementation.
std::vector< CbcNode * > nodes_
Storage vector for the heap.
void realpush(CbcNode *node)
Test for an empty tree.
int numberBranching_
Size of variable list.
int maximumNodeNumber() const
Get maximum node number.
CbcNode * nodePointer(int i) const
Return a node pointer.
Simple Branch and bound class.
virtual ~CbcTree()
Destructor.
double lastObjective() const
Last objective in branch-and-cut search tree.
int lastDepth() const
Last depth in branch-and-cut search tree.