Exports a binary heap structure with with simple nodes.
Definition at line 6 of file api_pathfinding.cc.
◆ simple_heap_x()
simple_heap_x::simple_heap_x |
( |
| ) |
|
◆ insert()
void simple_heap_x::insert |
( |
integer |
weight, |
|
|
integer |
value |
|
) |
| |
Inserts a node into the heap.
- Parameters
-
weight | heap is sorted with respect to weight |
value | the data to be stored |
◆ is_empty()
bool simple_heap_x::is_empty |
( |
| ) |
|
- Returns
- true when heap is empty
◆ len()
integer simple_heap_x::len |
( |
| ) |
|
- Returns
- number of nodes in heap
◆ pop()
void simple_heap_x::pop |
( |
| ) |
|
Pops the top node of the heap. Raises error if heap is empty.
- Returns
- top node
The documentation for this class was generated from the following file: