|
My Kernel v0.1.0
|
AVL tree implementation. More...
#include <kernel/types.h>#include <utils/compiler.h>#include <stdbool.h>#include <stddef.h>

Go to the source code of this file.
Data Structures | |
| struct | avl |
| A single node of an AVL tree. More... | |
Macros | |
| #define | AVL_EMPTY_NODE ((avl_t){0}) |
| Create an empty AVL node, with no child nor parent. | |
Typedefs | |
| typedef int(* | avl_compare_t) (const avl_t *left, const avl_t *right) |
| Comparison function used during AVL tree operations. More... | |
Functions | |
| static ssize_t | avl_height (const avl_t *avl) |
| Returns the height of an AVL tree. | |
| static bool | avl_is_root (const avl_t *avl) |
| Returns hether the given AVL node is the root of a tree. | |
| const avl_t * | avl_search (avl_t *root, avl_t *value, avl_compare_t) |
| Search a value inside an AVL tree. More... | |
| avl_t * | avl_insert (avl_t **root, avl_t *new, avl_compare_t) |
| Insert a new node inside an AVL tree. More... | |
| avl_t * | avl_remove (avl_t **root, avl_t *value, avl_compare_t) |
| Remove a value from an AVL tree. More... | |
| void | avl_print (avl_t *root, void(*print)(const avl_t *)) |
| Print the content of an AVL tree. More... | |
| const avl_t * | avl_min (const avl_t *root) |
| Find the minimum value inside an AVL tree. More... | |
| const avl_t * | avl_max (const avl_t *root) |
| Find the maximum value inside an AVL tree. More... | |