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.
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)
constexpr Node *& RLINK(Node *p) noexcept
Return the right tree of p.
void destroyRec(Node *&root) noexcept
Free recursively all the memory occupied by the tree root
constexpr Node *& LLINK(Node *p) noexcept
Return a pointer to left subtree.
Main namespace for Aleph-w library functions.
static void bin_to_tree(BNode *broot, TNode *troot)
DynList< T > maps(const C &c, Op op)
Classic map operation.
Utility functions for binary tree operations.
General tree (n-ary tree) node.