aboutsummaryrefslogtreecommitdiff
path: root/inc/pqueue.h
diff options
context:
space:
mode:
authorMarvin Borner2023-05-21 18:09:04 +0200
committerMarvin Borner2023-05-21 18:51:58 +0200
commit7ebabbb0022bce1cd6c05db583acb20d8659a356 (patch)
treed95ce3a5f6897ad19bc4ea6ccdfb603035a5908d /inc/pqueue.h
parent8499010b91a2c7496d6af74cce35a6b4e0378633 (diff)
Added additional optimizer
This will be useful for variadic index lengths
Diffstat (limited to 'inc/pqueue.h')
-rw-r--r--inc/pqueue.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/inc/pqueue.h b/inc/pqueue.h
index 3b4752d..c3ad021 100644
--- a/inc/pqueue.h
+++ b/inc/pqueue.h
@@ -58,6 +58,7 @@ struct pqueue {
size_t step; /**< growth stepping setting */
pqueue_cmp_pri_f cmppri; /**< callback to compare nodes */
pqueue_get_pri_f getpri; /**< callback to get priority of a node */
+ pqueue_set_pos_f setpos; /**< callback to set position of a node */
void **d; /**< The actualy queue in binary heap form */
};
@@ -74,7 +75,7 @@ struct pqueue {
* @return the handle or NULL for insufficent memory
*/
struct pqueue *pqueue_init(size_t n, pqueue_cmp_pri_f cmppri,
- pqueue_get_pri_f getpri);
+ pqueue_get_pri_f getpri, pqueue_set_pos_f set_pos);
/**
* free all memory used by the queue