@@ -21,7 +21,7 @@ extern "C" {
21
21
/**
22
22
* \file pheap.h
23
23
* \defgroup util_pheap pheap
24
- * Pairing Heap Implementation
24
+ * \brief Pairing Heap Implementation
25
25
* \ingroup pico_util
26
26
*
27
27
* pheap defines a simple pairing heap. The implementation simply tracks array indexes, it is up to
@@ -53,7 +53,7 @@ typedef struct pheap_node {
53
53
} pheap_node_t ;
54
54
55
55
/**
56
- * A user comparator function for nodes in a pairing heap.
56
+ * \brief A user comparator function for nodes in a pairing heap.
57
57
*
58
58
* \return true if a < b in natural order. Note this relative ordering must be stable from call to call.
59
59
*/
@@ -71,7 +71,7 @@ typedef struct pheap {
71
71
} pheap_t ;
72
72
73
73
/**
74
- * Create a pairing heap, which effectively maintains an efficient sorted ordering
74
+ * \brief Create a pairing heap, which effectively maintains an efficient sorted ordering
75
75
* of nodes. The heap itself stores no user per-node state, it is expected
76
76
* that the user maintains a companion array. A comparator function must
77
77
* be provided so that the heap implementation can determine the relative ordering of nodes
@@ -86,13 +86,13 @@ typedef struct pheap {
86
86
pheap_t * ph_create (uint max_nodes , pheap_comparator comparator , void * user_data );
87
87
88
88
/**
89
- * Removes all nodes from the pairing heap
89
+ * \brief Removes all nodes from the pairing heap
90
90
* \param heap the heap
91
91
*/
92
92
void ph_clear (pheap_t * heap );
93
93
94
94
/**
95
- * De-allocates a pairing heap
95
+ * \brief De-allocates a pairing heap
96
96
*
97
97
* Note this method must *ONLY* be called on heaps created by ph_create()
98
98
* \param heap the heap
@@ -135,7 +135,7 @@ static pheap_node_id_t ph_merge_nodes(pheap_t *heap, pheap_node_id_t a, pheap_no
135
135
}
136
136
137
137
/**
138
- * Allocate a new node from the unused space in the heap
138
+ * \brief Allocate a new node from the unused space in the heap
139
139
*
140
140
* \param heap the heap
141
141
* \return an identifier for the node, or 0 if the heap is full
@@ -151,7 +151,7 @@ static inline pheap_node_id_t ph_new_node(pheap_t *heap) {
151
151
}
152
152
153
153
/**
154
- * Inserts a node into the heap.
154
+ * \brief Inserts a node into the heap.
155
155
*
156
156
* This method inserts a node (previously allocated by ph_new_node())
157
157
* into the heap, determining the correct order by calling
@@ -170,7 +170,7 @@ static inline pheap_node_id_t ph_insert_node(pheap_t *heap, pheap_node_id_t id)
170
170
}
171
171
172
172
/**
173
- * Returns the head node in the heap, i.e. the node
173
+ * \brief Returns the head node in the heap, i.e. the node
174
174
* which compares first, but without removing it from the heap.
175
175
*
176
176
* \param heap the heap
@@ -181,7 +181,7 @@ static inline pheap_node_id_t ph_peek_head(pheap_t *heap) {
181
181
}
182
182
183
183
/**
184
- * Remove the head node from the pairing heap. This head node is
184
+ * \brief Remove the head node from the pairing heap. This head node is
185
185
* the node which compares first in the logical ordering provided
186
186
* by the comparator.
187
187
*
@@ -198,7 +198,7 @@ static inline pheap_node_id_t ph_peek_head(pheap_t *heap) {
198
198
pheap_node_id_t ph_remove_head (pheap_t * heap , bool free );
199
199
200
200
/**
201
- * Remove the head node from the pairing heap. This head node is
201
+ * \brief Remove the head node from the pairing heap. This head node is
202
202
* the node which compares first in the logical ordering provided
203
203
* by the comparator.
204
204
*
@@ -214,7 +214,7 @@ static inline pheap_node_id_t ph_remove_and_free_head(pheap_t *heap) {
214
214
}
215
215
216
216
/**
217
- * Remove and free an arbitrary node from the pairing heap. This is a more
217
+ * \brief Remove and free an arbitrary node from the pairing heap. This is a more
218
218
* costly operation than removing the head via ph_remove_and_free_head()
219
219
*
220
220
* @param heap the heap
@@ -224,7 +224,7 @@ static inline pheap_node_id_t ph_remove_and_free_head(pheap_t *heap) {
224
224
bool ph_remove_and_free_node (pheap_t * heap , pheap_node_id_t id );
225
225
226
226
/**
227
- * Determine if the heap contains a given node. Note containment refers
227
+ * \brief Determine if the heap contains a given node. Note containment refers
228
228
* to whether the node is inserted (ph_insert_node()) vs allocated (ph_new_node())
229
229
*
230
230
* @param heap the heap
@@ -237,7 +237,7 @@ static inline bool ph_contains_node(pheap_t *heap, pheap_node_id_t id) {
237
237
238
238
239
239
/**
240
- * Free a node that is not currently in the heap, but has been allocated
240
+ * \brief Free a node that is not currently in the heap, but has been allocated
241
241
*
242
242
* @param heap the heap
243
243
* @param id the id of the node
@@ -255,7 +255,7 @@ static inline void ph_free_node(pheap_t *heap, pheap_node_id_t id) {
255
255
}
256
256
257
257
/**
258
- * Print a representation of the heap for debugging
258
+ * \brief Print a representation of the heap for debugging
259
259
*
260
260
* @param heap the heap
261
261
* @param dump_key a method to print a node value
@@ -264,7 +264,7 @@ static inline void ph_free_node(pheap_t *heap, pheap_node_id_t id) {
264
264
void ph_dump (pheap_t * heap , void (* dump_key )(pheap_node_id_t id , void * user_data ), void * user_data );
265
265
266
266
/**
267
- * Initialize a statically allocated heap (ph_create() using the C heap).
267
+ * \brief Initialize a statically allocated heap (ph_create() using the C heap).
268
268
* The heap member `nodes` must be allocated of size max_nodes.
269
269
*
270
270
* @param heap the heap
@@ -275,7 +275,7 @@ void ph_dump(pheap_t *heap, void (*dump_key)(pheap_node_id_t id, void *user_data
275
275
void ph_post_alloc_init (pheap_t * heap , uint max_nodes , pheap_comparator comparator , void * user_data );
276
276
277
277
/**
278
- * Define a statically allocated pairing heap. This must be initialized
278
+ * \brief Define a statically allocated pairing heap. This must be initialized
279
279
* by ph_post_alloc_init
280
280
*/
281
281
#define PHEAP_DEFINE_STATIC (name , _max_nodes ) \
0 commit comments