7.9. igraph_heap_reserve — Allocate more memory

int igraph_heap_reserve(igraph_heap_t* h, long int size);

Allocates memory for future use. The size of the heap is unchanged. If the heap is larger than the size parameter then nothing happens.

Arguments: 

h:

The heap object.

size:

The number of elements to allocate memory for.

Returns: 

Error code.

Time complexity: O(size) if size is larger than the current number of elements. O(1) otherwise.