Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
move xbt_heap_float_t
[simgrid.git] / include / xbt / heap.h
index ec853b6..56f0ef1 100644 (file)
@@ -6,19 +6,13 @@
 #ifndef _XBT_HEAP_H
 #define _XBT_HEAP_H
 
-typedef struct xbt_heap *xbt_heap_t;
-
-/* The following two definitions concern the type of the keys used for
-   the heaps. That should be handled via configure (FIXME). */
-typedef long double xbt_heap_float_t;
-#define XBT_HEAP_FLOAT_T "%Lg"      /* for printing purposes */
+#include "xbt/misc.h"
 
-
-/* pointer to a function freeing something (should be common to all .h : FIXME) */
-typedef void (void_f_pvoid_t) (void*);
+typedef struct xbt_heap *xbt_heap_t;
 
 xbt_heap_t xbt_heap_new(int num, void_f_pvoid_t free_func);
 void xbt_heap_free(xbt_heap_t H);
+int xbt_heap_size(xbt_heap_t H);
 
 void xbt_heap_push(xbt_heap_t H, void *content, xbt_heap_float_t key);
 void *xbt_heap_pop(xbt_heap_t H);
@@ -26,4 +20,4 @@ void *xbt_heap_pop(xbt_heap_t H);
 xbt_heap_float_t xbt_heap_maxkey(xbt_heap_t H);
 void *xbt_heap_maxcontent(xbt_heap_t H);
 
-#endif /* _XBT_HEAP_H */
+#endif                         /* _XBT_HEAP_H */