1 /* Copyright (c) 2004, 2005, 2007, 2009, 2010. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 #ifndef _XBT_HEAP_PRIVATE_H
8 #define _XBT_HEAP_PRIVATE_H
10 #include "xbt/dynar.h" /* void_f_pvoid_t */
13 typedef struct xbt_heapItem {
16 } s_xbt_heapItem_t, *xbt_heapItem_t;
18 typedef struct xbt_heap {
23 void (*update_callback) (void *, int);
28 #define RIGHT(i) 2*i+1
30 #define KEY(H,i) ((H->items)[i]).key
31 #define CONTENT(H,i) ((H->items)[i]).content
33 #define MIN_KEY_VALUE -10000
35 static void xbt_heap_maxHeapify(xbt_heap_t H);
36 static void xbt_heap_increaseKey(xbt_heap_t H, int i);
38 #endif /* _XBT_HEAP_PRIVATE_H */