39# ifndef TPL_NODEPOOL_H
40# define TPL_NODEPOOL_H
93 return new (
allocate())
Node (std::forward<typename Node::key_type>(key));
116 if (node_pool.
size() == n)
125 delete node_pool.
pop();
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.
size_t blossom_maximum_cardinality_matching(const GT &g, DynDlist< typename GT::Arc * > &matching, SA sa=SA())
Alias of compute_maximum_cardinality_general_matching().
T * allocate(AhArenaAllocator &arena, Args &&... args)
Allocate and construct an object in an arena.
Stack implementations backed by dynamic or fixed arrays.