Struct binheap_params

Struct Documentation

struct binheap_params

binheap initialization parameters.

Public Members

int (*cmpe)(const void *const e1, const void *const e2)

For comparing elements. Cannot be NULL.

int (*cmpkey)(const void *const e1, const void *const e2)

For comparing keys associated with elements. Cannot be NULL.

void (*printe)(const void *e)

For printing an element. Can be NULL. If NULL, you can’t use binheap_print().

dptr_t *elements

Pointer to application-allocated space for storing the binheap data. Ignored unless RCSW_NOALLOC_DATA is passed.

size_t elt_size

Size of elements in bytes.

size_t max_elts

Maximum number of elements allowed.

uint32_t flags

Configuration flags. See binheap::flags for valid flags.

size_t init_size

Initial size of heap.