|
static TreeNode | leftRotate (TreeNode tree) |
| Rotates a tree to left. More...
|
|
static TreeNode | rightRotate (TreeNode tree) |
| Rotates a tree to right. More...
|
|
static TreeNode | leftBalance (TreeNode tree) |
| Rebalances a tree that is balanced to the left as result of an insertion operation. More...
|
|
static TreeNode | rightBalance (TreeNode tree) |
| Rebalances a tree that is balanced to the right as result of an insertion operation. More...
|
|
static TreeNode | rLeftBalance (TreeNode tree, int *h) |
| Rebalances a tree that is balanced to the left as result of a remotion operation. More...
|
|
static TreeNode | rRightBalance (TreeNode tree, int *h) |
| Rebalances a tree that is balanced to the right as result of a remotion operation. More...
|
|
static TreeNode | upperLeft (TreeNode tree) |
| Returns the node with the greatest key on the left subtree of a tree. More...
|
|
TreeMap | newTree (int(*keyComp)(void *, void *)) |
| Creates a tree. More...
|
|
int | treeSetKComp (TreeMap tree, int(*keyComp)(void *, void *)) |
| Sets the comparison function of this tree. More...
|
|
static void | treeDelAux (TreeNode tree) |
| Deletes a node of a tree and all of its children nodes. More...
|
|
void | treeDelete (TreeMap tree) |
| Deletes a tree. More...
|
|
static TreeNode | treeInsAux (TreeNode tree, void *key, void *val, int replace, int *h, int(*comp)(void *, void *)) |
| Insertion auxiliary function. More...
|
|
int | treeInsert (TreeMap tree, void *key, void *val, int replace) |
| Associates a value to a key in a tree. More...
|
|
static TreeNode | treeRemAux (TreeNode tree, void *key, void **value, void(*del)(void *), int *h, int(*comp)(void *, void *)) |
| Remotion auxiliary function. More...
|
|
int | treeRemove (TreeMap tree, void *key, void **value, void(*del)(void *)) |
| Removes the mapping for a key from a tree. More...
|
|
int | treeGet (TreeMap tree, void *key, void **value) |
| Provides the mapping for a key from a tree. More...
|
|
int | treeIsBalancedAux (TreeNode tree) |
| Checks if a tree is balanced. More...
|
|
int | treeIsBalanced (TreeMap tree) |
| Checks if a tree is balanced. More...
|
|
static int | treeHightAux (TreeNode tree) |
| Returns the height of a tree. More...
|
|
int | treeHeight (TreeMap tree) |
| Returns the height of a tree. More...
|
|
int | treeSize (TreeMap tree) |
| Returns the number of elements present in a tree. More...
|
|
static void | treeInOAux (TreeNode tree, void(*fun)(void *, void *)) |
| Inorder traversal auxiliary function. More...
|
|
int | treeInOrder (TreeMap tree, void(*fun)(void *, void *)) |
| Applies a function to the elements of an tree (inorder traversal). More...
|
|
static void | treePreOrderAux (TreeNode tree, void(*fun)(void *, void *)) |
| Preorder traversal auxiliary function. More...
|
|
int | treePreOrder (TreeMap tree, void(*fun)(void *, void *)) |
| Applies a function to the elements of an tree (preorder traversal). More...
|
|
static void | treePostOrderAux (TreeNode tree, void(*fun)(void *, void *)) |
| Postorder traversal auxiliary function. More...
|
|
int | treePostOrder (TreeMap tree, void(*fun)(void *, void *)) |
| Applies a function to the elements of an tree (postorder traversal). More...
|
|
static int | treeKAux (TreeNode tree, Iterator it) |
| Traverses a tree and adds the keys to an iterator. More...
|
|
Iterator | treeKeys (TreeMap tree) |
| Creates an iterator from the keys of a tree. More...
|
|
static int | treeVAux (TreeNode tree, Iterator it) |
| Traverses a tree and adds the values to an iterator. More...
|
|
Iterator | treeValues (TreeMap tree) |
| Creates an iterator from the values of a tree. More...
|
|
Implementation of an AVL tree (self-balancing binary search tree).
- Author
- Rui Carlos Gonçalves
- Version
- 3.0
- Date
- 07/2012
Definition in file treemap.c.