96# ifndef GRAPH_TO_TREE_H
97# define GRAPH_TO_TREE_H
108 template <AlephGraph GT,
typename Key,
class Convert>
static
110 template <AlephGraph GT,
typename Key,
class Convert>
static void
114 template <AlephGraph GT,
typename Key,
typename Convert, ArcFilter<GT> SA>
static inline
165 <<
"Graph is not a tree (not acyclique)";
210 template <AlephGraph
GT,
typename Key,
226 Arc * arc = it.get_current_arc_ne();
247 <<
"Graph is not a tree (not acyclique)";
288 template <AlephGraph GT,
typename Key,
typename Convert, ArcFilter<GT> SA>
static inline
298 Arc * arc = it.get_current_arc_ne();
Exception handling system with formatted messages for Aleph-w.
#define ah_domain_error_if(C)
Throws std::domain_error if condition holds.
C++20 concepts for the protocol shared by graph algorithms.
WeightedDigraph::Node Node
List_Graph< Graph_Node< Node_Info >, Graph_Arc< Arc_Info > > GT
void next_ne() noexcept
Advances the iterator to the next filtered element (noexcept version).
Functor class to convert a tree graph to Tree_Node structure.
Tree_Node< Key > * operator()(GT &g, typename GT::Node *groot, Convert &&conv=Convert())
Convert a tree graph to Tree_Node structure.
void graph_to_tree(typename GT::Node *groot, Tree_Node< Key > *troot)
Graph_To_Tree_Node(SA __sa=SA())
Tree_Node< Key > * graph_to_tree(GT &g, typename GT::Node *groot, Convert &conv)
Forward declaration used by CRTP helpers before the full node definition.
void insert_rightmost_child(Tree_Node *p) noexcept
Inserts p as the rightmost child of this.
A graph usable by the graph algorithms.
An arc filter (SA) for graph GT.
#define ARC_BITS(p)
Return the control bits of arc 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().
#define IS_ARC_VISITED(p, bit)
Determine whether the bit field is or not set to one.
Main namespace for Aleph-w library functions.
static Tree_Node< Key > * graph_to_tree_node(GT &g, typename GT::Node *groot)
static void __graph_to_tree_node(GT &g, typename GT::Node *groot, Tree_Node< Key > *troot)
Default filter for filtered iterators on arcs.
Filtered iterator of adjacent arcs of a node.
Generic graph and digraph implementations.
Utility algorithms and operations for graphs.
General tree (n-ary tree) node.