15#ifndef MINOTAURNODESTACK_H
16#define MINOTAURNODESTACK_H
22 typedef std::deque<NodePtr> NodePtrStack;
23 typedef NodePtrStack::iterator NodeStackIter;
24 typedef NodePtrStack::const_iterator NodeStackConstIter;
60 virtual void write(std::ostream &out)
const;
69 virtual size_t getSize()
const {
return (nodes_.size()); }
Declare the base class ActiveNodeStore for storing active nodes of the branch-and-bound tree.
Save and retrieve active nodes.
Definition: ActiveNodeStore.h:31
Definition: NodeStack.h:31
virtual void write(std::ostream &out) const
Write in order the node ID and the depth of each active node.
Definition: NodeStack.cpp:78
virtual void pop()
Remove the best node from the heap.
Definition: NodeStack.cpp:65
virtual bool isEmpty() const
Return true if there are no active nodes in the heap, otherwise return false.
Definition: NodeStack.cpp:35
virtual UInt getDeepestLevel() const
The maximum depth is the depth of the topmost node in the stack.
Definition: NodeStack.cpp:58
virtual void push(NodePtr n)
Add a node to the set of active nodes.
Definition: NodeStack.cpp:71
NodeStackIter nodesBegin()
Get iterator to the first node in the heap.
NodeStackIter nodesEnd()
Get iterator to the last node in the heap.
virtual double getBestLB() const
Find the minimum lower bound of all the active nodes in the stack. This function is expensive and mus...
Definition: NodeStack.cpp:42
NodeStack()
Constructor.
Definition: NodeStack.cpp:23
virtual size_t getSize() const
Get the number of active nodes in the heap.
Definition: NodeStack.h:69
virtual NodePtr top() const
Get access to the best node in this heap.
Definition: NodeStack.h:66
virtual ~NodeStack()
Destroy.
Definition: NodeStack.cpp:29
Definition: ActiveNodeStore.h:20
unsigned int UInt
Unsigned integer.
Definition: Types.h:30