1#include <gtest/gtest.h>
18static_assert(BinNodeLike<BinNode<int>>
and BinNodeLike<BinNodeVtl<int>>);
19static_assert(BinNodeLike<AvlNode<int>>
and BinNodeLike<RbNode<int>>
and BinNodeLike<TreapNode<int>>);
20static_assert(BinNodeLike<RandNode<int>>
and BinNodeLike<BinNodeXt<int>>
and BinNodeLike<AvlNodeRk<int>>);
22static_assert(BinNodeLike<const BinNode<int>>);
23static_assert(not BinNodeLike<int>
and not BinNodeLike<DynList<int>>);
25static_assert(RankedBinNodeLike<BinNodeXt<int>>
and RankedBinNodeLike<AvlNodeRk<int>>);
26static_assert(RankedBinNodeLike<Treap_Rk_Node<int>>
and RankedBinNodeLike<RandNode<int>>);
27static_assert(not RankedBinNodeLike<BinNode<int>>
and not RankedBinNodeLike<AvlNode<int>>);
39TEST(AhBinNodeConceptsTest, ConstrainedUtilitiesStillRun)
43 for (
int k : {5, 2, 8, 1, 9})
53TEST(AhBinNodeConceptsTest, NullptrIsTheEmptyTreeWithoutSentinel)
62TEST(AhBinNodeConceptsDeathTest, NullptrRootInSentinelTreeIsReported)
WeightedDigraph::Node Node
Node for extended binary search tree.
Node for binary search tree.
__gmp_expr< T, __gmp_binary_expr< __gmp_expr< T, U >, unsigned long int, __gmp_root_function > > root(const __gmp_expr< T, U > &expr, unsigned long int l)
Node * insert_by_key_xt(Node *&r, Node *p, Compare &cmp) noexcept
Insert a node in an extended binary search tree.
Node * select(Node *r, const size_t pos)
Iterative selection of a node according to inorder position.
void destroyRec(Node *&root) noexcept
Free all the memory occupied by the tree root
Node * searchInBinTree(Node *root, const typename Node::key_type &key, const Compare &cmp=Compare()) noexcept(nothrow_compare_v< Compare, typename Node::key_type >)
Search a key in a binary search tree using optimistic search.
size_t computeHeightRec(Node *root) noexcept
Compute the height of root
Main namespace for Aleph-w library functions.
and
Check uniqueness with explicit hash + equality functors.
AVL tree with rank (order statistics).
AVL tree implementation (height-balanced BST).
Utility functions for binary tree operations.
Extended binary node with subtree count.
Basic binary tree node definitions.
Randomized binary search tree.
Red-Black tree implementation (bottom-up balancing).
Treap with rank (order statistics).
Treap: randomized BST combining tree and heap properties.