Logo ROOT  
Reference Guide
priorityq-heap.c File Reference
#include <stddef.h>
#include <assert.h>
#include "priorityq-heap.h"
#include "memalloc.h"
#include "geom.h"
Include dependency graph for priorityq-heap.c:
This graph shows which files directly or indirectly include this file:

Macros

#define FALSE   0
 
#define INIT_SIZE   32
 
#define LEQ(x, y)   VertLeq((GLUvertex *)x, (GLUvertex *)y)
 
#define TRUE   1
 

Functions

static void FloatDown (PriorityQ *pq, long curr)
 
static void FloatUp (PriorityQ *pq, long curr)
 
void pqDelete (PriorityQ *pq, PQhandle hCurr)
 
void pqDeletePriorityQ (PriorityQ *pq)
 
PQkey pqExtractMin (PriorityQ *pq)
 
void pqInit (PriorityQ *pq)
 
PQhandle pqInsert (PriorityQ *pq, PQkey keyNew)
 
PriorityQpqNewPriorityQ (int(*leq)(PQkey key1, PQkey key2))
 

Macro Definition Documentation

◆ FALSE

#define FALSE   0

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

◆ INIT_SIZE

#define INIT_SIZE   32

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

◆ LEQ

#define LEQ (   x,
  y 
)    VertLeq((GLUvertex *)x, (GLUvertex *)y)

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

◆ TRUE

#define TRUE   1

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

Function Documentation

◆ FloatDown()

static void FloatDown ( PriorityQ pq,
long  curr 
)
static

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

◆ FloatUp()

static void FloatUp ( PriorityQ pq,
long  curr 
)
static

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

◆ pqDelete()

void pqDelete ( PriorityQ pq,
PQhandle  hCurr 
)

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  keyNew 
)

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.