|
BWAPI
|
#include <Heap.h>
Public Member Functions | |
| Heap (bool isMinHeap=false) | |
| ~Heap () | |
| void | push (std::pair< _Tp, _Val > x) |
| void | pop () |
| const std::pair< _Tp, _Val > & | top () const |
| bool | set (_Tp &x, _Val &v) |
| const _Val & | get (_Tp &x) const |
| bool | contains (_Tp &x) const |
| bool | empty () const |
| int | size () const |
| void | clear () |
| bool | erase (_Tp &x) |
An associated heap class with the ability to read and change the values of arbitrary objects in the heap. Note: Objects in the heap must be unique, however any number of objects can have the same value
Removes all of the elements in the heap
Returns true if the heap contains the given element, false otherwise
Returns true if the heap has no elements, false otherwise

Deletes the given object from the heap
| an | object that already exists in the heap |
Looks up the given object and returns its value
| object | to look up |
Pops the top of the heap

Pushes an object associated with the given value onto the heap
| The | object-value pair to push onto the heap |
Updates the given object with the given value and moves the object to the appropiate place in the heap
| an | object that exists in the heap |
| the | new value for that object |
Returns the number of elements in the heap
Returns a reference to the object-value pair at the top of the heap

1.7.6.1