Classes | Macros | Functions
zmaxheap.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <assert.h>
#include <stdint.h>
#include "zmaxheap.h"
Include dependency graph for zmaxheap.c:

Go to the source code of this file.

Classes

struct  zmaxheap
 

Macros

#define MIN_CAPACITY   16
 

Functions

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_tzmaxheap_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)())
 

Macro Definition Documentation

#define MIN_CAPACITY   16

Definition at line 52 of file zmaxheap.c.

Function Documentation

static void maxheapify ( zmaxheap_t heap,
int  parent 
)
static

Definition at line 306 of file zmaxheap.c.

static void swap_default ( zmaxheap_t heap,
int  a,
int  b 
)
inlinestatic

Definition at line 67 of file zmaxheap.c.

static void swap_pointer ( zmaxheap_t heap,
int  a,
int  b 
)
inlinestatic

Definition at line 79 of file zmaxheap.c.

void zmaxheap_add ( zmaxheap_t heap,
void *  p,
float  v 
)

Definition at line 139 of file zmaxheap.c.

zmaxheap_t* zmaxheap_create ( size_t  el_sz)

Definition at line 92 of file zmaxheap.c.

void zmaxheap_destroy ( zmaxheap_t heap)

Definition at line 105 of file zmaxheap.c.

void zmaxheap_ensure_capacity ( zmaxheap_t heap,
int  capacity 
)

Definition at line 118 of file zmaxheap.c.

void zmaxheap_iterator_finish ( zmaxheap_iterator_t it)

Definition at line 342 of file zmaxheap.c.

void zmaxheap_iterator_init ( zmaxheap_t heap,
zmaxheap_iterator_t it 
)

Definition at line 253 of file zmaxheap.c.

int zmaxheap_iterator_next ( zmaxheap_iterator_t it,
void *  p,
float *  v 
)

Definition at line 261 of file zmaxheap.c.

int zmaxheap_iterator_next_volatile ( zmaxheap_iterator_t it,
void *  p,
float *  v 
)

Definition at line 281 of file zmaxheap.c.

void zmaxheap_iterator_remove ( zmaxheap_iterator_t it)

Definition at line 301 of file zmaxheap.c.

int zmaxheap_remove_index ( zmaxheap_t heap,
int  idx,
void *  p,
float *  v 
)

Definition at line 186 of file zmaxheap.c.

int zmaxheap_remove_max ( zmaxheap_t heap,
void *  p,
float *  v 
)

Definition at line 248 of file zmaxheap.c.

int zmaxheap_size ( zmaxheap_t heap)

Definition at line 113 of file zmaxheap.c.

void zmaxheap_test ( )

Definition at line 357 of file zmaxheap.c.

void zmaxheap_vmap ( zmaxheap_t heap,
void(*)()  f 
)

Definition at line 166 of file zmaxheap.c.



apriltags2
Author(s): Danylo Malyuta
autogenerated on Fri Oct 19 2018 04:02:33