39# ifndef SEARCH_TREES_TEST_COMMON_H
40# define SEARCH_TREES_TEST_COMMON_H
42# include <gtest/gtest.h>
69 using namespace Aleph;
95 std::vector<std::unique_ptr<Node>>
nodes;
100 nodes.push_back(std::make_unique<Node>(key));
101 return nodes.back().get();
104 [[nodiscard]]
size_t size() const noexcept {
return nodes.size(); }
108 template <
class Tree>
111# define SEARCH_TREES_TEST_NAME(Tree) \
113 struct Tree_Name<Tree<int>> \
115 static constexpr const char * value = #Tree; \
133# undef SEARCH_TREES_TEST_NAME
138 template <
class Tree>
WeightedDigraph::Node Node
Hybrid top-down/bottom-up red-black tree with rank support.
Hybrid top-down/bottom-up red-black tree.
Top-down red-black tree with rank (no virtual destructor).
Top-down red-black tree without virtual destructor.
QuadTree - Hierarchical spatial index for 2D points.
Owns the nodes of a tree, which does not free them.
Node * make(const int key)
std::vector< std::unique_ptr< Node > > nodes
size_t size() const noexcept
The node stores the AVL balance factor.
The node has a red or black color.
The node stores the size of its subtree.
The node stores a heap priority.
The tree draws random numbers, from a seed that can be set.
Main namespace for Aleph-w library functions.
::testing::Types< Avl_Tree_Rk< int >, Rb_Tree_Rk< int >, TdRbTreeRk< int >, HtdRbTreeRk< int >, Treap_Rk< int >, Rand_Tree< int >, Splay_Tree_Rk< int > > Ranked_Trees
The trees whose nodes count the nodes of their subtree.
::testing::Types< BinTree< int >, Avl_Tree< int >, Avl_Tree_Rk< int >, Rb_Tree< int >, Rb_Tree_Rk< int >, TdRbTree< int >, TdRbTreeRk< int >, HtdRbTree< int >, HtdRbTreeRk< int >, Treap< int >, Treap_Rk< int >, Rand_Tree< int >, Splay_Tree< int >, Splay_Tree_Rk< int > > All_Trees
Every binary search tree of the library.
::testing::Types< Rb_Tree< int >, Rb_Tree_Rk< int >, TdRbTree< int >, TdRbTreeRk< int >, HtdRbTree< int >, HtdRbTreeRk< int > > Red_Black_Trees
The red-black trees.
::testing::Types< Treap< int >, Treap_Rk< int > > Treaps
The treaps.
::testing::Types< Avl_Tree< int >, Avl_Tree_Rk< int > > Avl_Trees
The AVL trees.
#define SEARCH_TREES_TEST_NAME(Tree)
Ranked AVL tree with nodes without a virtual destructor.
AVL binary search tree with nodes without a virtual destructor.
Binary search tree with nodes without virtual destructors,.
Randomized binary search tree.
Red-Black binary search tree with nodes without virtual destructor and with subtree counters for sele...
Red-black tree with nodes without virtual destructor.
Extended treap (a special type of randomized binary search tree) which manages selection and splittin...
Treap (a special type of randomized binary search tree) using nodes without virtual destructor.
The name a tree type shows in the name of its tests.
Names the instances of a typed test suite after their tree.
static std::string GetName(int)
AVL tree with rank (order statistics).
AVL tree implementation (height-balanced BST).
Utility functions for binary tree operations.
Generic unbalanced binary search tree.
Hybrid top-down/bottom-up red-black tree with rank support.
Hybrid top-down/bottom-up red-black tree implementation.
Randomized binary search tree.
Red-Black tree with rank (order statistics).
Red-Black tree implementation (bottom-up balancing).
Top-down splay tree with rank support.
Top-down splay tree implementation (without rank support).
Top-down Red-Black tree with rank support.
Top-down Red-Black tree implementation.
Treap with rank (order statistics).
Treap: randomized BST combining tree and heap properties.