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 "debug_print.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

◆ MIN_CAPACITY

#define MIN_CAPACITY   16

Definition at line 55 of file zmaxheap.c.

Function Documentation

◆ maxheapify()

static void maxheapify ( zmaxheap_t heap,
int  parent 
)
static

Definition at line 309 of file zmaxheap.c.

◆ swap_default()

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

Definition at line 70 of file zmaxheap.c.

◆ swap_pointer()

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

Definition at line 83 of file zmaxheap.c.

◆ zmaxheap_add()

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

Definition at line 143 of file zmaxheap.c.

◆ zmaxheap_create()

zmaxheap_t* zmaxheap_create ( size_t  el_sz)

Definition at line 96 of file zmaxheap.c.

◆ zmaxheap_destroy()

void zmaxheap_destroy ( zmaxheap_t heap)

Definition at line 109 of file zmaxheap.c.

◆ zmaxheap_ensure_capacity()

void zmaxheap_ensure_capacity ( zmaxheap_t heap,
int  capacity 
)

Definition at line 122 of file zmaxheap.c.

◆ zmaxheap_iterator_finish()

void zmaxheap_iterator_finish ( zmaxheap_iterator_t it)

Definition at line 345 of file zmaxheap.c.

◆ zmaxheap_iterator_init()

void zmaxheap_iterator_init ( zmaxheap_t heap,
zmaxheap_iterator_t it 
)

Definition at line 256 of file zmaxheap.c.

◆ zmaxheap_iterator_next()

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

Definition at line 264 of file zmaxheap.c.

◆ zmaxheap_iterator_next_volatile()

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

Definition at line 284 of file zmaxheap.c.

◆ zmaxheap_iterator_remove()

void zmaxheap_iterator_remove ( zmaxheap_iterator_t it)

Definition at line 304 of file zmaxheap.c.

◆ zmaxheap_remove_index()

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

Definition at line 189 of file zmaxheap.c.

◆ zmaxheap_remove_max()

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

Definition at line 251 of file zmaxheap.c.

◆ zmaxheap_size()

int zmaxheap_size ( zmaxheap_t heap)

Definition at line 117 of file zmaxheap.c.

◆ zmaxheap_test()

void zmaxheap_test ( )

Definition at line 360 of file zmaxheap.c.

◆ zmaxheap_vmap()

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

Definition at line 170 of file zmaxheap.c.



apriltag
Author(s): Edwin Olson , Max Krogius
autogenerated on Mon Jun 26 2023 02:26:35