Logo ROOT  
Reference Guide
priorityq-heap.h File Reference
This graph shows which files directly or indirectly include this file:

Classes

struct  PQhandleElem
 
struct  PQnode
 
struct  PriorityQ
 

Macros

#define __gl_pqHeapIsEmpty(pq)   ((pq)->size == 0)
 
#define __gl_pqHeapMinimum(pq)   ((pq)->handles[(pq)->nodes[1].handle].key)
 
#define pqDelete(pq, handle)   __gl_pqHeapDelete(pq,handle)
 
#define pqDeletePriorityQ(pq)   __gl_pqHeapDeletePriorityQ(pq)
 
#define pqExtractMin(pq)   __gl_pqHeapExtractMin(pq)
 
#define PQhandle   PQHeapHandle
 
#define pqInit(pq)   __gl_pqHeapInit(pq)
 
#define pqInsert(pq, key)   __gl_pqHeapInsert(pq,key)
 
#define pqIsEmpty(pq)   __gl_pqHeapIsEmpty(pq)
 
#define PQkey   PQHeapKey
 
#define pqMinimum(pq)   __gl_pqHeapMinimum(pq)
 
#define pqNewPriorityQ(leq)   __gl_pqHeapNewPriorityQ(leq)
 
#define PriorityQ   PriorityQHeap
 

Typedefs

typedef long PQhandle
 
typedef voidPQkey
 
typedef struct PriorityQ PriorityQ
 

Functions

void pqDelete (PriorityQ *pq, PQhandle handle)
 
void pqDeletePriorityQ (PriorityQ *pq)
 
PQkey pqExtractMin (PriorityQ *pq)
 
void pqInit (PriorityQ *pq)
 
PQhandle pqInsert (PriorityQ *pq, PQkey key)
 
PriorityQpqNewPriorityQ (int(*leq)(PQkey key1, PQkey key2))
 

Macro Definition Documentation

◆ __gl_pqHeapIsEmpty

#define __gl_pqHeapIsEmpty (   pq)    ((pq)->size == 0)

Definition at line 105 of file priorityq-heap.h.

◆ __gl_pqHeapMinimum

#define __gl_pqHeapMinimum (   pq)    ((pq)->handles[(pq)->nodes[1].handle].key)

Definition at line 104 of file priorityq-heap.h.

◆ pqDelete

#define pqDelete (   pq,
  handle 
)    __gl_pqHeapDelete(pq,handle)

Definition at line 64 of file priorityq-heap.h.

◆ pqDeletePriorityQ

#define pqDeletePriorityQ (   pq)    __gl_pqHeapDeletePriorityQ(pq)

Definition at line 45 of file priorityq-heap.h.

◆ pqExtractMin

#define pqExtractMin (   pq)    __gl_pqHeapExtractMin(pq)

Definition at line 63 of file priorityq-heap.h.

◆ PQhandle

#define PQhandle   PQHeapHandle

Definition at line 41 of file priorityq-heap.h.

◆ pqInit

#define pqInit (   pq)    __gl_pqHeapInit(pq)

Definition at line 60 of file priorityq-heap.h.

◆ pqInsert

#define pqInsert (   pq,
  key 
)    __gl_pqHeapInsert(pq,key)

Definition at line 61 of file priorityq-heap.h.

◆ pqIsEmpty

#define pqIsEmpty (   pq)    __gl_pqHeapIsEmpty(pq)

Definition at line 65 of file priorityq-heap.h.

◆ PQkey

#define PQkey   PQHeapKey

Definition at line 40 of file priorityq-heap.h.

◆ pqMinimum

#define pqMinimum (   pq)    __gl_pqHeapMinimum(pq)

Definition at line 62 of file priorityq-heap.h.

◆ pqNewPriorityQ

#define pqNewPriorityQ (   leq)    __gl_pqHeapNewPriorityQ(leq)

Definition at line 44 of file priorityq-heap.h.

◆ PriorityQ

#define PriorityQ   PriorityQHeap

Definition at line 42 of file priorityq-heap.h.

Typedef Documentation

◆ PQhandle

typedef long PQhandle

Definition at line 80 of file priorityq-heap.h.

◆ PQkey

typedef void* PQkey

Definition at line 79 of file priorityq-heap.h.

◆ PriorityQ

typedef struct PriorityQ PriorityQ

Definition at line 81 of file priorityq-heap.h.

Function Documentation

◆ pqDelete()

void pqDelete ( PriorityQ pq,
PQhandle  handle 
)

Definition at line 234 of file priorityq-heap.c.

◆ pqDeletePriorityQ()

void pqDeletePriorityQ ( PriorityQ pq)

Definition at line 88 of file priorityq-heap.c.

◆ pqExtractMin()

PQkey pqExtractMin ( PriorityQ pq)

Definition at line 211 of file priorityq-heap.c.

◆ pqInit()

void pqInit ( PriorityQ pq)

Definition at line 149 of file priorityq-heap.c.

◆ pqInsert()

PQhandle pqInsert ( PriorityQ pq,
PQkey  key 
)

Definition at line 163 of file priorityq-heap.c.

◆ pqNewPriorityQ()

PriorityQ * pqNewPriorityQ ( int(*)(PQkey key1, PQkey key2)  leq)

Definition at line 58 of file priorityq-heap.c.