|
static void | cstl_rbtree_init (struct cstl_rbtree *const t, cstl_compare_func_t *const cmp, void *const priv, const size_t off) |
| Initialize a red-black tree object.
|
|
static size_t | cstl_rbtree_size (const struct cstl_rbtree *const t) |
| Get the number of objects in the tree.
|
|
void | cstl_rbtree_insert (struct cstl_rbtree *t, void *e, void *p) |
| Insert a new object into the tree.
|
|
static const void * | cstl_rbtree_find (const struct cstl_rbtree *const t, const void *const e, const void **const p) |
| Find an element within a tree.
|
|
void * | cstl_rbtree_erase (struct cstl_rbtree *t, const void *e) |
| Remove an element from the tree.
|
|
static void | cstl_rbtree_clear (struct cstl_rbtree *const t, cstl_xtor_func_t *const clr, void *const priv) |
| Remove all elements from the tree.
|
|
static void | cstl_rbtree_swap (struct cstl_rbtree *const a, struct cstl_rbtree *const b) |
| Swap the tree objects at the two given locations.
|
|
static int | cstl_rbtree_foreach (const struct cstl_rbtree *const t, 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.
|
|
static void | cstl_rbtree_height (const struct cstl_rbtree *const t, size_t *const min, size_t *const max) |
| Determine the maximum and minimum heights of a tree.
|
|