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