Data Structures UFC  1.0.0
Essential Data Structures for C language
pqueue.h
Go to the documentation of this file.
1 
13 #ifndef PQUEUE_H
14 #ifndef PQUEUE_SIZE
15 #define PQUEUE_SIZE 10
16 #endif
17 
18 #define HEAP_EMPTY_CELL -1
19 
26 struct PQueue {
27  int heap[PQUEUE_SIZE];
28  int size;
29 };
30 
31 
32 typedef struct PQueue PQueue;
33 
35 
36 void pqueue_insert(PQueue *pq, int x);
37 
38 int pqueue_extract_max(PQueue *pq);
39 
40 void pqueue_increase_keys(PQueue *pq, int k, int v);
41 
42 int pqueue_maximum(PQueue *pq);
43 
44 void pqueue_free(PQueue *pq);
45 
46 void pqueue_print(PQueue *pq);
47 
48 void pqueue_println(PQueue *pq);
49 
50 #endif
int pqueue_extract_max(PQueue *pq)
Priority Queue Data Structure. Like a normal queue about push/pop logic, but each individual now heav...
Definition: pqueue.h:26
int pqueue_maximum(PQueue *pq)
void pqueue_print(PQueue *pq)
void pqueue_increase_keys(PQueue *pq, int k, int v)
void pqueue_free(PQueue *pq)
PQueue * pqueue_create()
int heap[PQUEUE_SIZE]
Definition: pqueue.h:27
void pqueue_insert(PQueue *pq, int x)
void pqueue_println(PQueue *pq)
int size
Definition: pqueue.h:28