|
liba 0.1.15
An algorithm library based on C/C++
|
Data Structures | |
| struct | a_avl_node |
| instance structure for AVL binary search tree node More... | |
| union | a_avl |
| instance structure for AVL binary search tree root More... | |
Macros | |
| #define | A_AVL_ROOT {A_NULL} |
| #define | a_avl_entry(ptr, type, member) |
| access the struct for this entry | |
| #define | a_avl_foreach(cur, root) |
| iterate over a AVL binary search tree in-order | |
| #define | A_AVL_FOREACH(cur, root) |
| #define | a_avl_foreach_reverse(cur, root) |
| iterate over a AVL binary search tree in-order reverse | |
| #define | A_AVL_FOREACH_REVERSE(cur, root) |
| #define | a_avl_pre_foreach(cur, root) |
| iterate over a AVL binary search tree preorder | |
| #define | A_AVL_PRE_FOREACH(cur, root) |
| #define | a_avl_pre_foreach_reverse(cur, root) |
| iterate over a AVL binary search tree preorder reverse | |
| #define | A_AVL_PRE_FOREACH_REVERSE(cur, root) |
| #define | a_avl_post_foreach(cur, root) |
| iterate over a AVL binary search tree postorder | |
| #define | A_AVL_POST_FOREACH(cur, root) |
| #define | a_avl_post_foreach_reverse(cur, root) |
| iterate over a AVL binary search tree postorder reverse | |
| #define | A_AVL_POST_FOREACH_REVERSE(cur, root) |
| #define | a_avl_fortear(cur, next, root) |
| tear a AVL binary search tree using postorder traversal | |
| #define | A_AVL_FORTEAR(cur, next, root) |
Typedefs | |
| typedef struct a_avl_node | a_avl_node |
| instance structure for AVL binary search tree node | |
| typedef union a_avl | a_avl |
| instance structure for AVL binary search tree root | |
Functions | |
| a_avl_node * | a_avl_parent (a_avl_node const *node) |
| access parent of AVL binary search tree node | |
| a_avl_node * | a_avl_init (a_avl_node *node, a_avl_node *parent) |
| initialize for AVL binary search tree node | |
| void | a_avl_root (a_avl *root) |
| initialize for AVL binary search tree root | |
| a_avl_node * | a_avl_head (a_avl const *root) |
| access head node of AVL binary search tree in-order | |
| a_avl_node * | a_avl_tail (a_avl const *root) |
| access tail node of AVL binary search tree in-order | |
| a_avl_node * | a_avl_next (a_avl_node *node) |
| access next node of AVL binary search tree node in-order | |
| a_avl_node * | a_avl_prev (a_avl_node *node) |
| access prev node of AVL binary search tree node in-order | |
| a_avl_node * | a_avl_pre_next (a_avl_node *node) |
| access next node of AVL binary search tree node preorder | |
| a_avl_node * | a_avl_pre_prev (a_avl_node *node) |
| access prev node of AVL binary search tree node preorder | |
| a_avl_node * | a_avl_post_head (a_avl const *root) |
| access head node of AVL binary search tree postorder | |
| a_avl_node * | a_avl_post_tail (a_avl const *root) |
| access tail node of AVL binary search tree postorder | |
| a_avl_node * | a_avl_post_next (a_avl_node *node) |
| access next node of AVL binary search tree node postorder | |
| a_avl_node * | a_avl_post_prev (a_avl_node *node) |
| access prev node of AVL binary search tree node postorder | |
| a_avl_node * | a_avl_tear (a_avl *root, a_avl_node **next) |
| tear a node from AVL binary search tree | |
| a_avl_node * | a_avl_search (a_avl const *root, void const *ctx, int(*cmp)(void const *, void const *)) |
| search specified content from AVL binary search tree | |
| a_avl_node * | a_avl_insert (a_avl *root, a_avl_node *node, int(*cmp)(void const *, void const *)) |
| insert specified node into AVL binary search tree | |
| void | a_avl_insert_adjust (a_avl *root, a_avl_node *node) |
| rebalance the tree after insertion of the specified node | |
| void | a_avl_remove (a_avl *root, a_avl_node *node) |
| remove specified node from AVL binary search tree | |
| #define a_avl_entry | ( | ptr, | |
| type, | |||
| member ) |
access the struct for this entry
| ptr | the &a_avl_node pointer |
| type | the type of the struct this is embedded in |
| member | the name of the a_avl_node within the struct |
| #define A_AVL_FOREACH | ( | cur, | |
| root ) |
| #define a_avl_foreach | ( | cur, | |
| root ) |
iterate over a AVL binary search tree in-order
| cur | the &a_avl_node to use as a loop counter |
| root | AVL binary search tree root |
| #define A_AVL_FOREACH_REVERSE | ( | cur, | |
| root ) |
| #define a_avl_foreach_reverse | ( | cur, | |
| root ) |
iterate over a AVL binary search tree in-order reverse
| cur | the &a_avl_node to use as a loop counter |
| root | AVL binary search tree root |
| #define A_AVL_FORTEAR | ( | cur, | |
| next, | |||
| root ) |
| #define a_avl_fortear | ( | cur, | |
| next, | |||
| root ) |
tear a AVL binary search tree using postorder traversal
| cur | the &a_avl_node to use as a loop counter |
| next | the &a_avl_node to use as next node |
| root | AVL binary search tree root |
| #define A_AVL_POST_FOREACH | ( | cur, | |
| root ) |
| #define a_avl_post_foreach | ( | cur, | |
| root ) |
iterate over a AVL binary search tree postorder
| cur | the &a_avl_node to use as a loop counter |
| root | AVL binary search tree root |
| #define A_AVL_POST_FOREACH_REVERSE | ( | cur, | |
| root ) |
| #define a_avl_post_foreach_reverse | ( | cur, | |
| root ) |
iterate over a AVL binary search tree postorder reverse
| cur | the &a_avl_node to use as a loop counter |
| root | AVL binary search tree root |
| #define A_AVL_PRE_FOREACH | ( | cur, | |
| root ) |
| #define a_avl_pre_foreach | ( | cur, | |
| root ) |
iterate over a AVL binary search tree preorder
| cur | the &a_avl_node to use as a loop counter |
| root | AVL binary search tree root |
| #define A_AVL_PRE_FOREACH_REVERSE | ( | cur, | |
| root ) |
| #define a_avl_pre_foreach_reverse | ( | cur, | |
| root ) |
iterate over a AVL binary search tree preorder reverse
| cur | the &a_avl_node to use as a loop counter |
| root | AVL binary search tree root |
| a_avl_node * a_avl_head | ( | a_avl const * | root | ) |
access head node of AVL binary search tree in-order
| [in] | root | AVL binary search tree root |
| a_avl_node * a_avl_init | ( | a_avl_node * | node, |
| a_avl_node * | parent ) |
initialize for AVL binary search tree node
| [in] | node | node to be initialized |
| [in] | parent | node parent |
| a_avl_node * a_avl_insert | ( | a_avl * | root, |
| a_avl_node * | node, | ||
| int(* | cmp )(void const *, void const *) ) |
insert specified node into AVL binary search tree
| [in] | root | AVL binary search tree root |
| [in] | node | specified tree node |
| [in] | cmp | a function that compares two nodes
|
| void a_avl_insert_adjust | ( | a_avl * | root, |
| a_avl_node * | node ) |
rebalance the tree after insertion of the specified node
| [in] | root | AVL binary search tree root |
| [in] | node | insert tree node |
| a_avl_node * a_avl_next | ( | a_avl_node * | node | ) |
access next node of AVL binary search tree node in-order
| [in] | node | AVL binary search tree node |
| a_avl_node * a_avl_parent | ( | a_avl_node const * | node | ) |
access parent of AVL binary search tree node
| [in] | node | points to AVL binary search tree node |
| a_avl_node * a_avl_post_head | ( | a_avl const * | root | ) |
access head node of AVL binary search tree postorder
| [in] | root | AVL binary search tree root |
| a_avl_node * a_avl_post_next | ( | a_avl_node * | node | ) |
access next node of AVL binary search tree node postorder
| [in] | node | AVL binary search tree node |
| a_avl_node * a_avl_post_prev | ( | a_avl_node * | node | ) |
access prev node of AVL binary search tree node postorder
| [in] | node | AVL binary search tree node |
| a_avl_node * a_avl_post_tail | ( | a_avl const * | root | ) |
access tail node of AVL binary search tree postorder
| [in] | root | AVL binary search tree root |
| a_avl_node * a_avl_pre_next | ( | a_avl_node * | node | ) |
access next node of AVL binary search tree node preorder
| [in] | node | AVL binary search tree node |
| a_avl_node * a_avl_pre_prev | ( | a_avl_node * | node | ) |
access prev node of AVL binary search tree node preorder
| [in] | node | AVL binary search tree node |
| a_avl_node * a_avl_prev | ( | a_avl_node * | node | ) |
access prev node of AVL binary search tree node in-order
| [in] | node | AVL binary search tree node |
| void a_avl_remove | ( | a_avl * | root, |
| a_avl_node * | node ) |
remove specified node from AVL binary search tree
| [in] | root | AVL binary search tree root |
| [in] | node | specified tree node |
| void a_avl_root | ( | a_avl * | root | ) |
initialize for AVL binary search tree root
| [in,out] | root | AVL binary search tree root |
| a_avl_node * a_avl_search | ( | a_avl const * | root, |
| void const * | ctx, | ||
| int(* | cmp )(void const *, void const *) ) |
search specified content from AVL binary search tree
| [in] | root | AVL binary search tree root |
| [in] | ctx | specified content |
| [in] | cmp | a function that compares two nodes
|
| a_avl_node * a_avl_tail | ( | a_avl const * | root | ) |
access tail node of AVL binary search tree in-order
| [in] | root | AVL binary search tree root |
| a_avl_node * a_avl_tear | ( | a_avl * | root, |
| a_avl_node ** | next ) |
tear a node from AVL binary search tree
| [in] | root | AVL binary search tree root |
| [in,out] | next | input starting node or, if null, root node. output next node or null. |