|
ADS
Algorithms and Data Structures
|
The binary search trees balanced by join alone, and the augmented maps, beyond the book. More...
Files | |
| file | ADS/tree/JoinTree.h |
| The binary search trees balanced by join alone, and the augmented maps, beyond the book: JoinTree< K , V , B , G > is a DICTIONARY [see ADT.h] of keys K and values V whose only balancing operation is the join of the scheme B [see JoinAlgorithms.h], AVLBalance, RedBlackBalance, WeightBalance or TreapBalance, so that the insertions and the removals are a split or a descent followed by joins, and the bulk operations of Joinable (union, intersection, difference, batches of insertions and of removals, filter, map and reduce, extraction of a range) are those of the four schemes alike. | |
Concepts | |
| concept | ADS::Augmentation |
| an augmentation of a map from K to V: a monoid on G::Value, of identity G::identity() and associative operation G::combine( a , b ), and the value G::from( k , v ) of a pair; the augmented value of a subtree is the combination of the values of its pairs by increasing keys | |
Classes | |
| struct | ADS::NoAugmentation |
| no augmentation: nothing is kept, nothing computed More... | |
| struct | ADS::SumAugmentation< V > |
| the sum of the values, an abelian group when V has the opposites More... | |
| struct | ADS::MaxAugmentation< V > |
| the largest of the values, whose identity is \( -\infty \) if V has it, its smallest value otherwise: a commutative and selective monoid More... | |
| class | ADS::JoinTree< K, V, B, G, Policy, A > |
| a DICTIONARY on a binary search tree balanced by the join of B alone, augmented by G, whose changes go to the observers of the subject policy Policy [see Modification.h] More... | |
| struct | ADS::JoinTreeNodes< K, V, B, G, Policy, A > |
| the adaptor of the nodes of a JoinTree [see JoinAdaptor] More... | |
| struct | ADS::AVLBalance |
| the AVL trees [see AVLJoin] More... | |
| struct | ADS::RedBlackBalance |
| the Red-Black trees [see RedBlackJoin] More... | |
| struct | ADS::WeightBalance |
| the weight-balanced trees More... | |
| struct | ADS::TreapBalance |
| the treaps [see TreapJoin] More... | |
Typedefs | |
| template<std::totally_ordered K, class V, class G = NoAugmentation, class Policy = NoObservers, class A = std::allocator< std::pair< const K , V > >> | |
| using | ADS::JoinAVLTree = JoinTree< K , V , AVLBalance , G , Policy , A > |
| the AVL tree whose balance is in join alone | |
| template<std::totally_ordered K, class V, class G = NoAugmentation, class Policy = NoObservers, class A = std::allocator< std::pair< const K , V > >> | |
| using | ADS::JoinRedBlackTree = JoinTree< K , V , RedBlackBalance , G , Policy , A > |
| the Red-Black tree whose balance is in join alone | |
| template<std::totally_ordered K, class V, class G = NoAugmentation, class Policy = NoObservers, class A = std::allocator< std::pair< const K , V > >> | |
| using | ADS::WeightBalancedTree = JoinTree< K , V , WeightBalance , G , Policy , A > |
| the tree balanced by weight, in join alone | |
| template<std::totally_ordered K, class V, class G = NoAugmentation, class Policy = NoObservers, class A = std::allocator< std::pair< const K , V > >> | |
| using | ADS::JoinTreap = JoinTree< K , V , TreapBalance , G , Policy , A > |
| the treap whose balance is in join alone | |
| template<std::totally_ordered K, class V, class G, class Policy = NoObservers, class A = std::allocator< std::pair< const K , V > >> | |
| using | ADS::AugmentedMap = JoinTree< K , V , WeightBalance , G , Policy , A > |
| the map augmented by G, balanced by weight as in PAM | |
The binary search trees balanced by join alone, and the augmented maps, beyond the book.
The definitions, the invariants and the costs of the area are in Theory of trees.
| using ADS::AugmentedMap = JoinTree< K , V , WeightBalance , G , Policy , A > |
the map augmented by G, balanced by weight as in PAM
| using ADS::JoinAVLTree = JoinTree< K , V , AVLBalance , G , Policy , A > |
the AVL tree whose balance is in join alone
| using ADS::JoinRedBlackTree = JoinTree< K , V , RedBlackBalance , G , Policy , A > |
the Red-Black tree whose balance is in join alone
| using ADS::JoinTreap = JoinTree< K , V , TreapBalance , G , Policy , A > |
the treap whose balance is in join alone
| using ADS::WeightBalancedTree = JoinTree< K , V , WeightBalance , G , Policy , A > |
the tree balanced by weight, in join alone