SimGrid  3.13
Versatile Simulation of Distributed Systems
heap.h File Reference
#include "xbt/misc.h"
#include "xbt/dynar.h"

Typedefs

typedef struct xbt_heapxbt_heap_t
 

Functions

xbt_heap_t xbt_heap_new (int init_size, void_f_pvoid_t const free_func)
 Creates a new heap. More...
 
void xbt_heap_free (xbt_heap_t H)
 kilkil a heap and its content More...
 
int xbt_heap_size (xbt_heap_t H)
 returns the number of elements in the heap More...
 
void xbt_heap_push (xbt_heap_t H, void *content, double key)
 Add an element into the heap. More...
 
voidxbt_heap_pop (xbt_heap_t H)
 Extracts from the heap and returns the element with the smallest key. More...
 
void xbt_heap_rm_elm (xbt_heap_t H, void *content, double key)
 Remove an arbitrary element from the heap. More...
 
double xbt_heap_maxkey (xbt_heap_t H)
 returns the smallest key in the heap (heap unchanged) More...
 
voidxbt_heap_maxcontent (xbt_heap_t H)
 returns the value associated to the smallest key in the heap (heap unchanged) More...
 
void xbt_heap_set_update_callback (xbt_heap_t H, void(*update_callback)(void *, int))
 Set the update callback function. More...
 
voidxbt_heap_remove (xbt_heap_t H, int i)
 Extracts from the heap and returns the element at position i. More...
 
void xbt_heap_update (xbt_heap_t H, int i, double key)
 Updates an element of the heap with a new value. More...