From 7ebabbb0022bce1cd6c05db583acb20d8659a356 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 21 May 2023 18:09:04 +0200 Subject: Added additional optimizer This will be useful for variadic index lengths --- inc/pqueue.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'inc/pqueue.h') 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 -- cgit v1.2.3