Top | ![]() |
![]() |
![]() |
![]() |
#define | dzl_heap_insert_val() |
#define | dzl_heap_index() |
#define | dzl_heap_peek() |
DzlHeap * | dzl_heap_new () |
DzlHeap * | dzl_heap_ref () |
void | dzl_heap_unref () |
void | dzl_heap_insert_vals () |
gboolean | dzl_heap_extract () |
gboolean | dzl_heap_extract_index () |
DzlHeap * dzl_heap_new (guint element_size
,GCompareFunc compare_func
);
Creates a new DzlHeap. A heap is a tree-like structure stored in
an array that is not fully sorted, but head is guaranteed to be either
the max, or min value based on compare_func
. This is also known as
a priority queue.
DzlHeap *
dzl_heap_ref (DzlHeap *heap
);
Increments the reference count of heap
by one.
void
dzl_heap_unref (DzlHeap *heap
);
Decrements the reference count of heap
by one, freeing the structure
when the reference count reaches zero.
gboolean dzl_heap_extract_index (DzlHeap *heap
,gsize index_
,gpointer result
);