11 #include "CoinFinite.hpp"
12 #include "CoinHelperFunctions.hpp"
21 #if defined(_MSC_VER) || defined(__MNO_CYGWIN)
24 #ifndef CBC_DUBIOUS_HEAP
66 virtual bool empty() ;
96 virtual void cleanTree(
CbcModel * model,
double cutoff,
double & bestPossibleObjective);
140 const double * currentLower,
141 const double * currentUpper);
146 std::vector <CbcNode *>
nodes_;
168 #ifdef JJF_ZERO // not used
169 class CbcTreeArray :
public CbcTree {
177 CbcTreeArray (
const CbcTreeArray & rhs);
179 CbcTreeArray &
operator=(
const CbcTreeArray & rhs);
181 virtual ~CbcTreeArray();
205 virtual bool empty() ;
236 #include "CoinSearchTree.hpp"
243 class CbcNewTree :
public CbcTree,
public CoinSearchTreeManager {
251 CbcNewTree (
const CbcNewTree & rhs);
253 CbcNewTree &
operator=(
const CbcNewTree & rhs);
255 virtual ~CbcNewTree();
258 virtual CbcNewTree *
clone()
const;
284 virtual bool empty() ;
287 inline int size()
const {
288 return nodes_.size();
372 inline int size()
const {
386 virtual bool empty();
418 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
[] operator
int getMaximumBranching() const
Get maximum branches.
virtual int size() const
Return size.
virtual CbcNode * bestNode(double cutoff)
Gets best node and takes off heap.
int maximumBranching_
Maximum size of variable list.
virtual void generateCpp(FILE *)
Create C++ lines to get to current state.
virtual bool empty()
Test if empty *** note may be overridden.
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)
int maximumNodeNumber_
Sort function for heap ordering.
void resetNodeNumbers()
Reset maximum node number.
virtual void endSearch()
We may have got an intelligent tree so give it one more chance.
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 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.
int getNumberBranching() const
Get number of branches.
virtual CbcNode * top() const
Return the top node of the heap.
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.
unsigned int * branched_
Integer variables branched or bounded top bit set if new upper bound next bit set if a branch...
Information required while the node is live.
int * newBound_
New bound.
std::vector< CbcNode * > nodes_
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.