The LevAWC Project
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Macros
Pages
pqueue.h
Go to the documentation of this file.
1
/*
2
* _____
3
* ANSI / ___/
4
* / /__
5
* \___/
6
*
7
* Filename: pqueue.h
8
* Author : Kyle Loudon/Dan Levin
9
* Date : Fri Mar 22 12:40:45 GMT 2013
10
* Version : 0.51
11
* ---
12
* Description: A priority queue ADT - in ANSI C.
13
*
14
* Revision history - coming up below:
15
*
16
* Date Revision message
17
* 150331 This code ready for version 0.51
18
*
19
*/
20
25
#ifndef _PQUEUE_H_
26
#define _PQUEUE_H_
27
28
#include <stdio.h>
29
#include <stdlib.h>
30
31
#include "
heap.h
"
32
33
#ifdef __cplusplus
34
extern
"C"
{
35
#endif
36
37
typedef
Heap
PQueue
;
38
39
/* --- FUNCTION DECLARATIONS --- */
64
PQueue
PQUEUEinit
(
int
(*compare)(
const
void
*key1,
const
void
* key2),
void
(*destroy)(
void
*data));
65
84
void
PQUEUEdestroy
(PQueue pq);
85
101
int
PQUEUEinsert
(PQueue pq,
const
void
*data);
102
113
const
void
*
PQUEUEpeek
(
const
PQueue pq);
114
137
int
PQUEUEextract
(PQueue pq,
void
**data);
138
148
int
PQUEUEsize
(PQueue pq);
149
164
void
PQUEUEprint
(PQueue pq,
void
(*callback)(
const
void
*data));
165
166
#ifdef __cplusplus
167
}
168
#endif
169
170
#endif
/* _PQUEUE_H_ */
Generated on Tue Apr 7 2015 09:01:12 for The LevAWC Project by
1.8.2