72 cout <<
" " << node->get_key();
82 catch (...) { n = 2; }
87 cerr <<
"Error: n must be a positive integer." <<
endl;
91 unsigned int t = std::time(0);
95 try { t =
static_cast<unsigned int>(
stoul(
argv[2])); }
96 catch (...) { t = std::time(0); }
101 cout <<
argv[0] <<
" " << n <<
" " << t <<
endl;
WeightedDigraph::Node Node
Node for binary search tree.
Forward declaration used by CRTP helpers before the full node definition.
__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)
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.
TNode * bin_to_forest(BNode *broot)
Converts a binary tree to its equivalent forest.
void destroy_forest(Node *root)
Destroys (frees memory) the forest whose first tree is root.
int inOrderRec(Node *root, void(*visitFct)(Node *, int, int))
Traverse recursively inorder a binary tree.
void destroyRec(Node *&root) noexcept
Free recursively all the memory occupied by the tree root
void forest_preorder_traversal(Node *root, void(*visitFct)(Node *, int, int))
Preorder traversal of a forest.
BNode * forest_to_bin(TNode *root)
Converts a forest to its equivalent binary tree.
Main namespace for Aleph-w library functions.
bool areEquivalents(Node *t1, Node *t2, Equal &op) noexcept
Return true if trees are equivalents.
static void printNode(Node *node, int, int)
BinNode< int > * random_tree(int l, int r)
Utility functions for binary tree operations.
General tree (n-ary tree) node.