diff options
| author | Kirill Petrashin <kirill8201@yandex.ru> | 2026-05-03 21:01:00 +0300 |
|---|---|---|
| committer | Kirill Petrashin <kirill8201@yandex.ru> | 2026-05-03 21:01:00 +0300 |
| commit | beef612173fe3840dff4c4bd9fc0c25e469a9aa6 (patch) | |
| tree | f3cd63db2fda047a6bd4293279ac4fde68fc5882 /priority_queue.h | |
| parent | d9d29ab80ddc33e864bf9caf36db524bbd3a0d25 (diff) | |
| download | astar-beef612173fe3840dff4c4bd9fc0c25e469a9aa6.tar.xz | |
Comments
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_ */ |
