6#ifndef __priorityq_heap_h_
7#define __priorityq_heap_h_
11#define PQkey PQHeapKey
12#define PQhandle PQHeapHandle
13#define PriorityQ PriorityQHeap
15#define pqNewPriorityQ(leq) __gl_pqHeapNewPriorityQ(leq)
16#define pqDeletePriorityQ(pq) __gl_pqHeapDeletePriorityQ(pq)
31#define pqInit(pq) __gl_pqHeapInit(pq)
32#define pqInsert(pq, key) __gl_pqHeapInsert(pq, key)
33#define pqMinimum(pq) __gl_pqHeapMinimum(pq)
34#define pqExtractMin(pq) __gl_pqHeapExtractMin(pq)
35#define pqDelete(pq, handle) __gl_pqHeapDelete(pq, handle)
36#define pqIsEmpty(pq) __gl_pqHeapIsEmpty(pq)
51typedef struct PriorityQ PriorityQ;
66 PQhandleElem *handles;
70 int (*leq)(PQkey key1, PQkey key2);
73PriorityQ *pqNewPriorityQ(
int (*leq)(PQkey key1, PQkey key2));
74void pqDeletePriorityQ(PriorityQ *pq);
76void pqInit(PriorityQ *pq);
77PQhandle pqInsert(PriorityQ *pq, PQkey key);
78PQkey pqExtractMin(PriorityQ *pq);
79void pqDelete(PriorityQ *pq, PQhandle handle);
81#define __gl_pqHeapMinimum(pq) ((pq)->handles[(pq)->nodes[1].handle].key)
82#define __gl_pqHeapIsEmpty(pq) ((pq)->size == 0)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:41 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.