|
Minotaur 0.4.1
Docs for developers
|
#include <NodeHeap.h>


Public Types | |
| enum | Type { Value , Depth } |
| Types of ordering. | |
Public Member Functions | |
| NodeHeap (Type type) | |
| Constructor. | |
| virtual | ~NodeHeap () |
| Destroy. | |
| virtual bool | isEmpty () const |
| virtual double | getBestLB () const |
| virtual UInt | getDeepestLevel () const |
| Find the maximum depth of all active nodes. | |
| virtual void | pop () |
| Remove the best node from the heap. | |
| virtual void | write (std::ostream &out) const |
| virtual void | push (NodePtr n) |
| Add a node to the set of active nodes. | |
| virtual void | setType (Type type) |
| Set the type of ordering of this heap. | |
| virtual NodePtr | top () const |
| Get access to the best node in this heap. | |
| virtual size_t | getSize () const |
| Get the number of active nodes in the heap. | |
| NodePtrIterator | nodesBegin () |
| Get iterator to the first node in the heap. | |
| NodePtrIterator | nodesEnd () |
| Get iterator to the last node in the heap. | |
Public Member Functions inherited from Minotaur::ActiveNodeStore | |
| ActiveNodeStore () | |
| Default Constructor. | |
| virtual | ~ActiveNodeStore () |
| Destroy. | |
When the active nodes of the branch-and-bound tree are not explored in a last-in-first-out (LIFO) order, we store them in a heap. A heap is a binary tree with the properties:
In order to create a heap, we need to have criteria for comparing nodes. These criteria are determined by the parameter for node-selection-strategy: best bound, best estimate, etc
|
virtual |
Find the minimum lower bound of all the active nodes in the heap. If the heap is ordered by best bound, then the root has the minimum value.
Implements Minotaur::ActiveNodeStore.
|
virtual |
Find the maximum depth of all active nodes.
Implements Minotaur::ActiveNodeStore.
|
inlinevirtual |
Get the number of active nodes in the heap.
Implements Minotaur::ActiveNodeStore.
|
inlinevirtual |
Return true if there are no active nodes in the heap, otherwise return false.
Implements Minotaur::ActiveNodeStore.
|
virtual |
Remove the best node from the heap.
Implements Minotaur::ActiveNodeStore.
|
virtual |
Add a node to the set of active nodes.
Implements Minotaur::ActiveNodeStore.
|
inlinevirtual |
Get access to the best node in this heap.
Implements Minotaur::ActiveNodeStore.
|
virtual |
Write in order the node ID and the criteria used to order the heap, e.g. bound value and depth.
Implements Minotaur::ActiveNodeStore.