diff options
Diffstat (limited to 'src/pqueue.h')
-rw-r--r-- | src/pqueue.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/pqueue.h b/src/pqueue.h index 126c3ea..8978a84 100644 --- a/src/pqueue.h +++ b/src/pqueue.h @@ -34,16 +34,18 @@ #include "types.h" +/** Element of a priority queue */ struct fastd_pqueue { - fastd_pqueue_t **pprev; - fastd_pqueue_t *next; + fastd_pqueue_t **pprev; /**< \e next element of the previous element (or \e children of the parent) */ + fastd_pqueue_t *next; /**< Next sibling in the heap */ - fastd_pqueue_t *children; + fastd_pqueue_t *children; /**< Heap children */ - int64_t value; + int64_t value; /**< The priority */ }; +/** Checks if an element is currently part of a priority queue */ static inline bool fastd_pqueue_linked(fastd_pqueue_t *elem) { return elem->pprev; } |