43# ifndef TPL_BALANCEXT_H
44# define TPL_BALANCEXT_H
71 template <
class Node>
inline
Exception handling system with formatted messages for Aleph-w.
#define ah_out_of_range_error_if(C)
Throws std::out_of_range if condition holds.
WeightedDigraph::Node Node
__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)
Node * select_gotoup_root(Node *root, const size_t &i)
Selecciona un nodo de un árbol binario según su posición infija y lo convierte en su raíz.
auto & COUNT(Node *p) noexcept
Return the number of nodes of the tree fron p is root.
Node * rotate_to_left_xt(Node *p) noexcept
Rotate to left the extended binary tree with root p.
Node * rotate_to_right_xt(Node *p) noexcept
Rotate to right the extended bianry tree with root p
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.
Node * balance_tree(Node *root)
Reequilibra un árbol binario de búsqueda.
Extended binary node with subtree count.