7.1. igraph_heap_init — Initializes an empty heap object.

int igraph_heap_init(igraph_heap_t* h, long int alloc_size);

Creates an empty heap, but allocates size for some elements.

Arguments: 

h:

Pointer to an uninitialized heap object.

alloc_size:

Number of elements to allocate memory for.

Returns: 

Error code.

Time complexity: O(alloc_size), assuming memory allocation is a linear operation.