57 cerr <<
"Invalid value for n: " <<
argv[1] <<
" (must be between 1 and 1,000,000)" <<
endl;
63 auto t =
static_cast<unsigned int> (
time (
nullptr));
66 if (
argv[2][0] ==
'-')
68 cerr <<
"Invalid value for t (must be non-negative): " <<
argv[2] <<
endl;
79 t =
static_cast<unsigned int>(
parsed_t);
88 std::uniform_int_distribution<int> dist(1,
upper);
90 cout <<
"testSplayTree " << n <<
" " << t <<
endl;
94 cout <<
"Inserting " << n <<
" random values in tree ...\n";
98 while (
insCount <
static_cast<unsigned int>(n))
112 cout <<
"arbol equilibrado" <<
endl;
115 cout <<
"error de equilibrio en el arbol" <<
endl;
121 cout <<
"testSplayTree " << n <<
" " << t <<
endl;
size_t size_t int32_t value
Node * insert(Node *p)
Inserts a node in a top down splay tree.
Node * search(const Key &key)
Searches a key in a top down splay tree.
Node *& getRoot()
Get the top-down splay tree's root.
size_t blossom_maximum_cardinality_matching(const GT &g, DynDlist< typename GT::Arc * > &matching, SA sa=SA())
Alias of compute_maximum_cardinality_general_matching().
void destroyRec(Node *&root) noexcept
Free recursively all the memory occupied by the tree root
void exit(const char *file, int line, const char *format,...)
Print a message and exit the program.
Extended binary node with subtree count.
Top-down splay tree with rank support.