diff options
Diffstat (limited to 'priority_queue.h')
| -rw-r--r-- | priority_queue.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/priority_queue.h b/priority_queue.h index 8ad4a26..0811205 100644 --- a/priority_queue.h +++ b/priority_queue.h @@ -17,18 +17,20 @@ PositionPQ *ppq_new(Position pos, size_t priority); /* Insert a pos with priority into a given PositionPQ */ #define PPQ_INSERT_SUCCESS 0 -#define PPQ_INSERT_NEW 1 /* ppq was NULL, created a new one */ +#define PPQ_INSERT_NEW 1 /* ppq was NULL, created a new one */ #define PPQ_INSERT_ALREADY 2 /* pos is already in ppq */ int ppq_insert(PositionPQ **ppq, Position pos, size_t priority); /* Remove and return the position with the lowest priority */ Position ppq_pop(PositionPQ **ppq); -/* Remove a given pos fron ppq */ +/* Remove a given pos fron ppq, used in ppq_insert() to avoid dups */ void ppq_remove(PositionPQ **ppq, Position pos); +/* Debug function, prints the contents of ppq to stdout */ void ppq_print(PositionPQ *ppq); +/* Frees the memory allocated for ppq */ void ppq_free(PositionPQ *ppq); #endif /* PRIORITY_QUEUE_H_ */ |
