175template <AlephGraph GT,
class Operation_On_Node = Default_Operation_On_Node<GT>,
176 class Operation_On_Arc = Default_Operation_On_Arc<GT>>
207 for (
size_t i = 0; i < height; ++i)
209 for (
size_t j = 0; j < width; ++j)
213 map[i * width + j] = n;
229 if (j + 1 < width
and i > 0)
Exception handling system with formatted messages for Aleph-w.
#define ah_length_error_if(C)
Throws std::length_error if condition holds.
#define ah_domain_error_if(C)
Throws std::domain_error if condition holds.
C++20 concepts for the protocol shared by graph algorithms.
Simplified graph interface for common use cases.
Simple dynamic array with automatic resizing and functional operations.
Functor to build a 2D grid graph with 8-connectivity.
void operator()(GT &g, const size_t &width, const size_t &height)
Build a grid graph.
virtual Node * insert_node(Node *node) noexcept
Insertion of a node already allocated.
typename Node::Node_Type Node_Type
The arc class type.
Arc * insert_arc(Node *src_node, Node *tgt_node, void *a)
constexpr size_t get_num_nodes() const noexcept
Return the total of nodes of graph.
void clear_graph(GT &g) noexcept
Clean a graph: all its nodes and arcs are removed and freed.
size_t blossom_maximum_cardinality_matching(const GT &g, DynDlist< typename GT::Arc * > &matching, SA sa=SA())
Alias of compute_maximum_cardinality_general_matching().
Main namespace for Aleph-w library functions.
and
Check uniqueness with explicit hash + equality functors.
Default no-op operation for arc initialization.
void operator()(GT &g, typename GT::Arc *a, const size_t &row, const size_t &col)
Called for each created arc.
Default no-op operation for node initialization.
void operator()(GT &g, typename GT::Node *n, const size_t &row, const size_t &col)
Called for each created node.
Dynamic array container with automatic resizing.