altEngine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
include
heap.h
Go to the documentation of this file.
1
#include <stdio.h>
2
#include <stdlib.h>
3
#include <limits.h>
4
5
6
#ifndef HEAP_H
7
#define HEAP_H
8
typedef
struct
9
{
10
int
index
;
11
float
data
;
12
}
heapkey_t
;
13
14
typedef
enum
15
{
16
MIN_HEAP
,
17
MAX_HEAP
18
}
type_t
;
19
20
class
Heap
21
{
22
public
:
23
Heap
();
24
Heap
(
type_t
type
);
25
int
insert
(
const
heapkey_t
*);
26
heapkey_t
extract
(
const
int
);
27
void
modify
(
const
heapkey_t
*);
28
void
fix
();
29
~Heap
();
30
31
int
heap_length
;
32
private
:
33
heapkey_t
*
heap
;
34
int
data_length
;
35
type_t
type
;
36
};
37
#endif
Generated on Tue Nov 21 2017 19:18:54 for altEngine by
1.8.2