|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Functor class to convert a tree graph to Tree_Node structure. More...
#include <graph_to_tree.H>
Public Member Functions | |
| Graph_To_Tree_Node (SA __sa=SA()) | |
| Tree_Node< Key > * | operator() (GT &g, typename GT::Node *groot, Convert &&conv=Convert()) |
| Convert a tree graph to Tree_Node structure. | |
| Tree_Node< Key > * | operator() (GT &g, typename GT::Node *groot, Convert &conv) |
Private Member Functions | |
| void | graph_to_tree (typename GT::Node *groot, Tree_Node< Key > *troot) |
| Tree_Node< Key > * | graph_to_tree (GT &g, typename GT::Node *groot, Convert &conv) |
Private Attributes | |
| SA | sa |
| Convert * | convert = nullptr |
Functor class to convert a tree graph to Tree_Node structure.
Provides a callable interface for converting spanning trees from graph representation to Tree_Node<Key> representation.
This class version offers more flexibility than the free function, allowing the arc filter to be configured at construction time.
operator()(gnode, tnode) that copies data from graph nodes to tree nodesDefinition at line 211 of file graph_to_tree.H.
|
inline |
Definition at line 260 of file graph_to_tree.H.
|
inlineprivate |
Definition at line 240 of file graph_to_tree.H.
References ah_domain_error_if, Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::convert, Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::graph_to_tree(), and Aleph::maps().
|
inlineprivate |
Definition at line 216 of file graph_to_tree.H.
References ARC_BITS, Aleph::Convert_Tree, Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::graph_to_tree(), IS_ARC_VISITED, Aleph::maps(), Aleph::Filter_Iterator< Container, It, Show_Item >::next_ne(), and Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::sa.
Referenced by Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::graph_to_tree(), Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::graph_to_tree(), Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::operator()(), and Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::operator()().
|
inline |
Convert a tree graph to Tree_Node structure.
| g | The tree graph to convert (must be acyclic) |
| groot | Node to use as the tree root |
| conv | Converter functor instance |
| std::domain_error | If the graph is not acyclic |
| std::bad_alloc | If memory allocation fails |
Definition at line 273 of file graph_to_tree.H.
References Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::graph_to_tree(), and Aleph::maps().
|
inline |
Definition at line 279 of file graph_to_tree.H.
References Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::graph_to_tree(), and Aleph::maps().
Definition at line 214 of file graph_to_tree.H.
Referenced by Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::graph_to_tree().
|
private |
Definition at line 213 of file graph_to_tree.H.
Referenced by Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::graph_to_tree().