A merge heap object base class - also serves as the full implementation for objects with a < comparison operator. More...
#include <tpie/mergeheap.h>
Public Member Functions | |
merge_heap_op (comp_t c=comp_t()) | |
size_t | sizeofheap () |
Reports the size of Heap (number of elements). More... | |
size_t | get_min_run_id () |
Returns the run with the minimum key. More... | |
void | allocate (size_t size) |
Allocates space for the heap. More... | |
void | insert (const REC *ptr, size_t run_id) |
Copies an (initial) element into the heap array/. More... | |
void | extract_min (REC &el, size_t &run_id) |
Extracts minimum element from heap array. More... | |
void | deallocate () |
Deallocates the space used by the heap. More... | |
void | initialize (void) |
Heapifies an initial array of elements. More... | |
void | delete_min_and_insert (const REC *nextelement_same_run) |
size_t | space_per_item (void) |
Returns the main memory space usage per item. More... | |
size_t | space_overhead (void) |
Returns the fixed main memory space overhead, regardless of item count. More... | |
A merge heap object base class - also serves as the full implementation for objects with a < comparison operator.
Definition at line 166 of file mergeheap.h.
|
inline |
|
inline |
Deallocates the space used by the heap.
Definition at line 215 of file mergeheap.h.
|
inline |
Extracts minimum element from heap array.
If you follow this with an immediate insert, consider using delete_min_and_insert().
Definition at line 206 of file mergeheap.h.
|
inline |
Returns the run with the minimum key.
Definition at line 189 of file mergeheap.h.
|
inline |
Heapifies an initial array of elements.
Definition at line 220 of file mergeheap.h.
|
inline |
Copies an (initial) element into the heap array/.
Definition at line 199 of file mergeheap.h.
|
inline |
Reports the size of Heap (number of elements).
Definition at line 184 of file mergeheap.h.
|
inline |
Returns the fixed main memory space overhead, regardless of item count.
Definition at line 241 of file mergeheap.h.
|
inline |
Returns the main memory space usage per item.
Definition at line 236 of file mergeheap.h.