libcstl
Loading...
Searching...
No Matches
Functions
bintree.c File Reference

Go to the source code of this file.

Functions

void cstl_bintree_insert (struct cstl_bintree *const bt, void *const e, void *const p)
 Insert a new object into the tree.
 
const void * cstl_bintree_find (const struct cstl_bintree *const bt, const void *f, const void **const par)
 Find an element within a tree.
 
void * cstl_bintree_erase (struct cstl_bintree *const bt, const void *const _p)
 Remove an element from the tree.
 
int cstl_bintree_foreach (const struct cstl_bintree *const bt, cstl_bintree_const_visit_func_t *const visit, void *const priv, const cstl_bintree_foreach_dir_t dir)
 Visit each element in a tree, calling a user-defined function for each visit.
 
void cstl_bintree_swap (struct cstl_bintree *const a, struct cstl_bintree *const b)
 Swap the tree objects at the two given locations.
 
void cstl_bintree_clear (struct cstl_bintree *const bt, cstl_xtor_func_t *const clr, void *const priv)
 Remove all elements from the tree.
 
void cstl_bintree_height (const struct cstl_bintree *const bt, size_t *const min, size_t *const max)
 Determine the maximum and minimum heights of a tree.