#include <fmfibheap.hpp>
Public Member Functions | |
FMFibHeap (const size_t &n) | |
Creates a heap with n maximum elements. | |
void | setMaxSize (const size_t &n) |
Sets the maximum number of cells the heap will contain. | |
void | push (const cell_t *c) |
Pushes a new element into the heap. | |
unsigned int | popMinIdx () |
Pops index of the element with lowest value and removes it from the heap. | |
size_t | size () const |
Returns current size of the heap. | |
void | update (const cell_t *c) |
Updates the position of the cell in the heap. Its priority can increase or decrease. | |
void | increase (const cell_t *c) |
Updates the position of the cell in the heap. Its priority can only increase. It is more efficient than the update() function if it is ensured that the priority will increase. | |
void | clear () |
Deallocates heap memory. | |
bool | empty () const |
Returns true if the heap is empty. | |
Protected Attributes | |
fib_heap_t | heap_ |
The actual heap for cell_t. More... | |
std::vector< handle_t > | handles_ |
Stores the handles of each cell by keeping the indices: handles_(0) is the handle for the cell with index 0 in the grid. Makes possible to update the heap. | |
Private Types | |
typedef boost::heap::fibonacci_heap < const cell_t *, boost::heap::compare < FMCompare< cell_t > > > | fib_heap_t |
Shorthand for heap type. | |
typedef fib_heap_t::handle_type | handle_t |
Shorthand for heap element handle type. | |
Definition at line 28 of file fmfibheap.hpp.
|
protected |
The actual heap for cell_t.
Definition at line 98 of file fmfibheap.hpp.