yfast 0.6.1
|
#include <avl.h>
Classes | |
struct | SplitResult |
Public Member Functions | |
AVL (Compare cmp=Compare()) | |
AVL (const AVL &other)=delete | |
AVL (AVL &&other) noexcept | |
unsigned int | height () const |
Node * | insert (Node *node) |
Node * | remove (Node *node) |
SplitResult | split () |
Public Member Functions inherited from yfast::impl::BST< Node, Compare > | |
BST (Compare cmp=Compare()) | |
BST (const BST &other)=delete | |
BST (BST &&other) noexcept | |
unsigned int | size () const |
Node * | root () const |
Node * | leftmost () const |
Node * | rightmost () const |
Node * | find (const Key &key) const |
Node * | pred (const Key &key, bool strict=false) const |
Node * | succ (const Key &key, bool strict=false) const |
Node * | insert (Node *node) |
RemoveReport | remove (Node *node) |
Static Public Member Functions | |
static AVL | merge (AVL &&subtree1, AVL &&subtree2) |
Static Public Member Functions inherited from yfast::impl::BST< Node, Compare > | |
static Node * | pred (Node *node) |
static Node * | succ (Node *node) |
Protected Member Functions | |
AVL (Node *root, Compare cmp=Compare()) | |
Protected Member Functions inherited from yfast::impl::BST< Node, Compare > | |
BST (Node *root, Compare cmp=Compare()) | |
Node * | seek (const Key &key) const |
Additional Inherited Members | |
Public Types inherited from yfast::impl::BST< Node, Compare > | |
typedef Node::Key | Key |
Static Protected Member Functions inherited from yfast::impl::BST< Node, Compare > | |
static Node * | _leftmost (Node *node) |
static Node * | _rightmost (Node *node) |
static void | link_left (Node *parent, Node *child) |
static void | link_right (Node *parent, Node *child) |
static void | update_size (Node *node) |
static void | update_size_path (Node *node) |
static void | inc_size_path (Node *node) |
static void | dec_size_path (Node *node) |
Protected Attributes inherited from yfast::impl::BST< Node, Compare > | |
Compare | _cmp |
Node * | _root |
AVL tree implementation
Node | node type |
Compare | key comparator |
|
inline |
insert a new node, replacing node with the equal key (if any)
node | node to insert |