annotate PriorityQueue.h @ 9:40cad2a2fffc

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