52 unsigned int t = std::time(0);
59 cout <<
argv[0] <<
" " << n <<
" " << t <<
endl;
64 for (i = 0; i < n; i++)
82 for (i = 0; i < n; i++)
107 cout <<
endl <<
"Join(T1, T2)" <<
endl;
115 cout <<
endl <<
"Join(T2, T1)" <<
endl;
123 for (i = 0; i < n; ++i)
138 cout <<
"join(t1, t2, dup): ";
Core header for the Aleph-w library.
WeightedDigraph::Node Node
Node for binary search tree.
static BinNode *const NullPtr
__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)
int preOrderRec(Node *root, void(*visitFct)(Node *, int, int))
Traverse recursively in preorder a binary tree.
Node * copyRec(Node *root)
Copy recursively a tree.
bool check_bst(Node *p, const Compare &cmp=Compare())
Return true if p is a binary search tree.
Node * insert_in_bst(Node *&r, Node *p, const Compare &cmp=Compare()) noexcept
Insert a node p in a binary search tree.
void destroyRec(Node *&root) noexcept
Free recursively all the memory occupied by the tree root
Node * searchInBinTree(Node *root, const typename Node::key_type &key, const Compare &cmp=Compare()) noexcept
Search a key in a binary search tree.
Node * insert_root(Node *&root, Node *p, const Compare &cmp=Compare()) noexcept
Insert the node p as root of a binary search tree.
Main namespace for Aleph-w library functions.
and
Check uniqueness with explicit hash + equality functors.
Divide_Conquer_DP_Result< Cost > divide_and_conquer_partition_dp(const size_t groups, const size_t n, Transition_Cost_Fn transition_cost, const Cost inf=dp_optimization_detail::default_inf< Cost >())
Optimize partition DP using divide-and-conquer optimization.
std::ostream & join(const C &c, const std::string &sep, std::ostream &out)
Join elements of an Aleph-style container into a stream.
void print_node(Node *p, int, int)
Utility functions for binary tree operations.
Extended binary node with subtree count.