74# include <gsl/gsl_rng.h>
Exception handling system with formatted messages for Aleph-w.
#define ah_bad_alloc_if(C)
Throws std::bad_alloc if condition holds.
Node for binary search tree.
BinNode *& getL() noexcept
Generator for uniformly random trees.
Tree_Node< T > * operator()(size_t n)
Generate a random tree with n nodes.
gsl_rng * r
GSL random number generator.
RandTree()
Construct generator with time-based seed.
RandTree(unsigned long seed)
Construct generator with specified seed.
BinNode< T > * random(unsigned long n)
Recursively generate random binary tree.
~RandTree()
Destructor releases GSL resources.
__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)
void destroyRec(Node *&root) noexcept
Free recursively all the memory occupied by the tree root
Main namespace for Aleph-w library functions.
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.
static void bin_to_tree(BNode *broot, TNode *troot)
Utility functions for binary tree operations.
General tree (n-ary tree) node.