+ if ((i < 0) || (i > H->count - 1))
+ return NULL;
+ /* put element i at head */
+ if (i > 0) {
+ KEY(H, i) = MIN_KEY_VALUE;
+ xbt_heap_increase_key(H, i);
+ }
+
+ return xbt_heap_pop(H);
+}
+
+/**
+ * @brief returns the smallest key in the heap (heap unchanged)
+ * \param H the heap we're working on
+ *
+ * \return the smallest key in the heap without modifying the heap.
+ */
+XBT_INLINE double xbt_heap_maxkey(xbt_heap_t H)
+{
+ xbt_assert(H->count != 0, "Empty heap");