Logo ROOT  
Reference Guide
priorityq.c File Reference
#include "gluos.h"
#include <stddef.h>
#include <assert.h>
#include <limits.h>
#include "memalloc.h"
#include "priorityq-heap.c"
#include "priorityq-sort.h"
Include dependency graph for priorityq.c:

Macros

#define GT(x, y)   (! LEQ(x,y))
 
#define LT(x, y)   (! LEQ(y,x))
 
#define Swap(a, b)   do{PQkey *tmp = *a; *a = *b; *b = tmp;}while(0)
 

Functions

void pqDelete (PriorityQ *pq, PQhandle curr)
 
void pqDeletePriorityQ (PriorityQ *pq)
 
PQkey pqExtractMin (PriorityQ *pq)
 
int pqInit (PriorityQ *pq)
 
PQhandle pqInsert (PriorityQ *pq, PQkey keyNew)
 
int pqIsEmpty (PriorityQ *pq)
 
PQkey pqMinimum (PriorityQ *pq)
 
PriorityQpqNewPriorityQ (int(*leq)(PQkey key1, PQkey key2))
 

Macro Definition Documentation

◆ GT

#define GT (   x,
  y 
)    (! LEQ(x,y))

Definition at line 88 of file priorityq.c.

◆ LT

#define LT (   x,
  y 
)    (! LEQ(y,x))

Definition at line 87 of file priorityq.c.

◆ Swap

#define Swap (   a,
  b 
)    do{PQkey *tmp = *a; *a = *b; *b = tmp;}while(0)

Definition at line 89 of file priorityq.c.

Function Documentation

◆ pqDelete()

void pqDelete ( PriorityQ pq,
PQhandle  curr 
)

Definition at line 248 of file priorityq.c.

◆ pqDeletePriorityQ()

void pqDeletePriorityQ ( PriorityQ pq)

Definition at line 77 of file priorityq.c.

◆ pqExtractMin()

PQkey pqExtractMin ( PriorityQ pq)

Definition at line 203 of file priorityq.c.

◆ pqInit()

int pqInit ( PriorityQ pq)

Definition at line 92 of file priorityq.c.

◆ pqInsert()

PQhandle pqInsert ( PriorityQ pq,
PQkey  keyNew 
)

Definition at line 174 of file priorityq.c.

◆ pqIsEmpty()

int pqIsEmpty ( PriorityQ pq)

Definition at line 242 of file priorityq.c.

◆ pqMinimum()

PQkey pqMinimum ( PriorityQ pq)

Definition at line 224 of file priorityq.c.

◆ pqNewPriorityQ()

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

Definition at line 50 of file priorityq.c.