27 #define FATHER(N) ((N)>>1)
28 #define LEFTSON(N) ((N)<<1)
29 #define RIGHTSON(N) ((N)<<1 + 1)
80 void **Data = (
void **) out_ptr;
101 if (HoleKey > Heap->
Entry[Son].
Key) {
130 void **Data = (
void **) out_ptr;
140 if (Heap->
Entry[Index].
Key > HoleKey) {
155 while (Hole > 1 && Heap->
Entry[Father].
Key > HoleKey) {
206 if (Heap->
Entry[Father].
Key > Key) {
297 if (HoleKey > Heap->
Entry[Son].
Key) {
331 destructor (Entry.
Data);
void HeapPush(HEAP *Heap, FLOAT32 Key, void *Data)
void(* void_dest)(void *)
HEAP * MakeHeap(int Size)
void DoError(int Error, const char *Message)
void FreeHeapData(HEAP *Heap, void_dest destructor)
int HeapPop(HEAP *Heap, FLOAT32 *Key, void *out_ptr)
int GetTopOfHeap(HEAP *Heap, HEAPENTRY *Entry)
bool HeapPushCheckSize(HEAP *Heap, FLOAT32 Key, void *Data)
void * Emalloc(size_t Size)
void HeapStore(HEAP *Heap, HEAPENTRY *Entry)
int HeapPopWorst(HEAP *Heap, FLOAT32 *Key, void *out_ptr)