103 unsigned int t = std::time(0);
120 cerr <<
"Error: n must be a positive integer." <<
endl;
138 cout <<
"writeAllTrees " << n <<
" " << t <<
endl;
146 cout <<
"Inserting " << n <<
" random values in treee ...\n";
148 for (i = 0; i < n; i++)
172 cout <<
"Inserting " << n <<
" random values in treee ...\n";
174 for (i = 0; i < n; i++)
198 cout <<
"Inserting " << n <<
" random values in treee ...\n";
200 for (i = 0; i < n; i++)
224 cout <<
"Inserting " << n <<
" random values in treee ...\n";
226 for (i = 0; i < n; i++)
250 cout <<
"Inserting " << n <<
" random values in treee ...\n";
252 for (i = 0; i < n; i++)
276 cout <<
"Inserting " << n <<
" random values in treee ...\n";
278 for (i = 0; i < n; i++)
Core header for the Aleph-w library.
size_t size_t int32_t value
Node *& getRoot() noexcept
Return the root of tree.
Node * insert(Node *p) noexcept
Insert a node in the tree.
Node * search(const Key &key) const noexcept
Search a key.
Node * search(const Key &key) const noexcept
Search a node containing key; if found, then a pointer to the node containing it is returned; otherwi...
constexpr Node *& getRoot() noexcept
Return a modifiable reference to tree's root.
Node * insert(Node *p) noexcept
Insert the node pointed by p in the tree.
Node * insert(Node *p) noexcept
Insert a node in the tree.
Node *& getRoot() noexcept
Return the tree's root.
Node * search(const Key &key) const noexcept
Search a key.
Node * insert(Node *p) noexcept
Insert a node into the tree.
Node * search(const Key &key) const noexcept
Search for a key in the tree.
Node *& getRoot() noexcept
Get reference to root pointer.
Node * search(const Key &key) const noexcept
Search a key in a treap.
Node *& getRoot() noexcept
Return the tree's root.
Node * insert(Node *root, Node *p) noexcept
Node *& getRoot() noexcept
Get the top-down splay tree's root.
Node * insert(Node *p) noexcept
Inserts a node in a top-down splay tree.
Node * search(const Key &key) noexcept
Searches a key in a top-down splay tree.
size_t blossom_maximum_cardinality_matching(const GT &g, DynDlist< typename GT::Arc * > &matching, SA sa=SA())
Alias of compute_maximum_cardinality_general_matching().
int preOrderRec(Node *root, void(*visitFct)(Node *, int, int))
Traverse recursively in preorder a binary tree.
void destroyRec(Node *&root) noexcept
Free recursively all the memory occupied by the tree root
Main namespace for Aleph-w library functions.
AVL binary search tree with nodes without a virtual destructor.
Binary search tree with nodes without virtual destructors,.
Randomized binary search tree.
Red-black tree with nodes without virtual destructor.
Treap (a special type of randomized binary search tree) using nodes without virtual destructor.
AVL tree implementation (height-balanced BST).
Utility functions for binary tree operations.
Generic unbalanced binary search tree.
Randomized binary search tree.
Red-Black tree implementation (bottom-up balancing).
Top-down splay tree implementation (without rank support).
Treap: randomized BST combining tree and heap properties.
void print_avl(Avl_Tree< int >::Node *p, int, int)
ofstream output_treap("treap.Tree", ios::out)
ofstream output_bin("bin.Tree", ios::out)
void print_rb(Rb_Tree< int >::Node *p, int, int)
void print_treap(Treap< int >::Node *p, int, int)
void print_splay(Splay_Tree< int >::Node *p, int, int)
void print_bin(BinTree< int >::Node *p, int, int)
ofstream output_rand("rand.Tree", ios::out)
ofstream output_splay("splay.Tree", ios::out)
void print_rand(Rand_Tree< int >::Node *p, int, int)
ofstream output_rb("rb.Tree", ios::out)
ofstream output_avl("avl.Tree", ios::out)