#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <assert.h>
#include <stdint.h>
#include "zmaxheap.h"
#include "debug_print.h"
Go to the source code of this file.
|
static void | maxheapify (zmaxheap_t *heap, int parent) |
|
static void | swap_default (zmaxheap_t *heap, int a, int b) |
|
static void | swap_pointer (zmaxheap_t *heap, int a, int b) |
|
void | zmaxheap_add (zmaxheap_t *heap, void *p, float v) |
|
zmaxheap_t * | zmaxheap_create (size_t el_sz) |
|
void | zmaxheap_destroy (zmaxheap_t *heap) |
|
void | zmaxheap_ensure_capacity (zmaxheap_t *heap, int capacity) |
|
void | zmaxheap_iterator_finish (zmaxheap_iterator_t *it) |
|
void | zmaxheap_iterator_init (zmaxheap_t *heap, zmaxheap_iterator_t *it) |
|
int | zmaxheap_iterator_next (zmaxheap_iterator_t *it, void *p, float *v) |
|
int | zmaxheap_iterator_next_volatile (zmaxheap_iterator_t *it, void *p, float *v) |
|
void | zmaxheap_iterator_remove (zmaxheap_iterator_t *it) |
|
int | zmaxheap_remove_index (zmaxheap_t *heap, int idx, void *p, float *v) |
|
int | zmaxheap_remove_max (zmaxheap_t *heap, void *p, float *v) |
|
int | zmaxheap_size (zmaxheap_t *heap) |
|
void | zmaxheap_test () |
|
void | zmaxheap_vmap (zmaxheap_t *heap, void(*f)()) |
|
◆ MIN_CAPACITY
◆ maxheapify()
static void maxheapify |
( |
zmaxheap_t * |
heap, |
|
|
int |
parent |
|
) |
| |
|
static |
◆ swap_default()
static void swap_default |
( |
zmaxheap_t * |
heap, |
|
|
int |
a, |
|
|
int |
b |
|
) |
| |
|
inlinestatic |
◆ swap_pointer()
static void swap_pointer |
( |
zmaxheap_t * |
heap, |
|
|
int |
a, |
|
|
int |
b |
|
) |
| |
|
inlinestatic |
◆ zmaxheap_add()
void zmaxheap_add |
( |
zmaxheap_t * |
heap, |
|
|
void * |
p, |
|
|
float |
v |
|
) |
| |
◆ zmaxheap_create()
◆ zmaxheap_destroy()
◆ zmaxheap_ensure_capacity()
void zmaxheap_ensure_capacity |
( |
zmaxheap_t * |
heap, |
|
|
int |
capacity |
|
) |
| |
◆ zmaxheap_iterator_finish()
◆ zmaxheap_iterator_init()
◆ zmaxheap_iterator_next()
◆ zmaxheap_iterator_next_volatile()
◆ zmaxheap_iterator_remove()
◆ zmaxheap_remove_index()
int zmaxheap_remove_index |
( |
zmaxheap_t * |
heap, |
|
|
int |
idx, |
|
|
void * |
p, |
|
|
float * |
v |
|
) |
| |
◆ zmaxheap_remove_max()
int zmaxheap_remove_max |
( |
zmaxheap_t * |
heap, |
|
|
void * |
p, |
|
|
float * |
v |
|
) |
| |
◆ zmaxheap_size()
◆ zmaxheap_test()
◆ zmaxheap_vmap()
void zmaxheap_vmap |
( |
zmaxheap_t * |
heap, |
|
|
void(*)() |
f |
|
) |
| |