39# ifndef TPL_NODEPOOL_H
40# define TPL_NODEPOOL_H
93 return new (
allocate())
Node (std::forward<typename Node::key_type>(key));
WeightedDigraph::Node Node
size_t size() const noexcept
Return the number of elements stored in the stack.
bool is_empty() const noexcept
Return true if stack is empty.
T pop() noexcept
Pop by moving the top of stack.
T & push(const T &data) noexcept(std::is_nothrow_copy_assignable_v< T >)
Push a copy of data
Conjunto de nodos a reusarse.
Node_Pool(size_t __n=100) noexcept
Node * allocate(const typename Node::key_type &key)
Aparta memoria para un nodo y le asigna un valor de clave de tipo Key.
Node * allocate(typename Node::key_type &&key)
FixedStack< Node * > node_pool
void deallocate(Node *p) noexcept
Libera el nodo p.
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.
Stack implementations backed by dynamic or fixed arrays.