96# ifndef GRAPH_TO_TREE_H
97# define GRAPH_TO_TREE_H
106 template <
class GT,
typename Key,
class Convert>
static
108 template <
class GT,
typename Key,
class Convert>
static void
112 template <
class GT,
typename Key,
typename Convert,
class SA>
static inline
158 template <
class GT,
typename Key,
163 <<
"Graph is not a tree (not acyclique)";
208 template <
class GT,
typename Key,
224 Arc * arc = it.get_current_arc_ne();
245 <<
"Graph is not a tree (not acyclique)";
286 template <
class GT,
typename Key,
typename Convert,
class SA>
static inline
296 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.
WeightedDigraph::Node Node
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)
_Graph_Node Node
The graph type.
List_Graph< Graph_Node< int >, Graph_Arc< int > > GT
#define ARC_BITS(p)
Return the control bits of arc p.
#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)
DynList< T > maps(const C &c, Op op)
Classic map operation.
Default filter for filtered iterators on arcs.
Arc of graph implemented with double-linked adjacency lists.
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.