view PriorityQueue.h @ 9:40cad2a2fffc

remove function declared (implementation -> TODO)
author hausers
date Fri, 02 Mar 2012 18:15:20 +0100
parents 7254bef12749
children ee94893d2843
line source
1 /*
2 * Copyright 2009 OpenSourceStewardshipFoundation.org
3 * Licensed under GNU General Public License version 2
4 *
5 * Author: hausers@cs.tu-berlin.de
6 */
8 #ifndef _PRIORITY_QUEUE_H
9 #define _PRIORITY_QUEUE_H
11 #include <stdbool.h>
13 #include "../../VMS_Implementations/VMS_impl/VMS_primitive_data_types.h"
15 typedef struct _PrioQueueStruc PrioQueueStruc;
16 typedef struct _heapNode heapNode;
18 struct _heapNode {
19 int key;
20 void *val;
21 };
23 struct _PrioQueueStruc {
24 int size;
25 int maxSize;
27 heapNode *data;
28 };
30 PrioQueueStruc* makePrioQ();
31 void* getFirstPrioQ (PrioQueueStruc *Q);
32 void* popPrioQ (PrioQueueStruc *Q);
33 bool insertPrioQ (void *val, int key, PrioQueueStruc *Q);
34 void freePrioQ (PrioQueueStruc *Q);
35 void removePrioQ (int key, PrioQueueStruc *Q);
37 #ifdef DEBUG
38 void printPrioQ (PrioQueueStruc *Q);
39 void swap (PrioQueueStruc *Q, int a, int b);
40 #endif
43 #endif