|
Aleph-w 7.10.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 320 of file graph_to_tree.H.
|
inline |
Definition at line 359 of file graph_to_tree.H.
|
inlineprivate |
Definition at line 325 of file graph_to_tree.H.
References Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::convert, 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 >::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 (acyclic by the arcs that the filter shows) |
| groot | Node to use as the tree root |
| conv | Converter functor instance |
| std::domain_error | If the arcs that the filter shows have a cycle |
| std::bad_alloc | If memory allocation fails |
| anything | that conv throws. If something throws, the tree that was built is freed. |
Definition at line 378 of file graph_to_tree.H.
References Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::graph_to_tree().
|
inline |
Definition at line 384 of file graph_to_tree.H.
References Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::graph_to_tree().
|
private |
Definition at line 323 of file graph_to_tree.H.
Referenced by Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::graph_to_tree(), and Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::graph_to_tree().
|
private |
Definition at line 322 of file graph_to_tree.H.
Referenced by Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::graph_to_tree(), and Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::graph_to_tree().