63 *
file_ptr << node->getPriority() <<
" ";
73 unsigned int t =
time(0);
88 cout <<
"treapObs " << n <<
" " << t <<
endl;
91 TreapTreeVtl<int>::Node *node;
94 cout <<
"Inserting " << n <<
" random values in treee ...\n";
96 for (i = 0; i < n; i++)
99 node = tree.search(value);
102 node =
new TreapTreeVtl<int>::Node (value);
107 file[0].open(
"treap-00.treap", ios::out);
108 file[1].open(
"treap-01.treap", ios::out);
109 file[2].open(
"treap-02.treap", ios::out);
110 file[3].open(
"treap-03.treap", ios::out);
111 file[4].open(
"treap-04.treap", ios::out);
112 file[5].open(
"treap-05.treap", ios::out);
113 file[6].open(
"treap-06.treap", ios::out);
114 file[7].open(
"treap-07.treap", ios::out);
115 file[8].open(
"treap-08.treap", ios::out);
116 file[9].open(
"treap-09.treap", ios::out);
117 file[10].open(
"treap-10.treap", ios::out);
118 file[11].open(
"treap-11.treap", ios::out);
127 cout <<
endl <<
"verifying TreapTreeVtl after insertions ... "
139 cout <<
"treapObs " << n <<
" " << t <<
endl;
Core header for the Aleph-w library.
T remove()
Remove the first item of the list.
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.
bool is_treap(Node *root) noexcept
Validate that a tree satisfies treap (heap) property.
DynList< T > maps(const C &c, Op op)
Classic map operation.
Utility functions for binary tree operations.
Treap: randomized BST combining tree and heap properties.
void print_prio(TreapTreeVtl< int >::Node *node)
unsigned long randomLong()
void print_key(TreapTreeVtl< int >::Node *node)