|
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 213 of file graph_to_tree.H.
|
inline |
Definition at line 262 of file graph_to_tree.H.
|
inlineprivate |
Definition at line 242 of file graph_to_tree.H.
References ah_domain_error_if, Aleph::blossom_maximum_cardinality_matching(), Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::convert, and Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::graph_to_tree().
|
inlineprivate |
Definition at line 218 of file graph_to_tree.H.
References ARC_BITS, Aleph::blossom_maximum_cardinality_matching(), Aleph::Convert_Tree, Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::graph_to_tree(), Aleph::Tree_Node< T >::insert_rightmost_child(), IS_ARC_VISITED, 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 275 of file graph_to_tree.H.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::graph_to_tree().
|
inline |
Definition at line 281 of file graph_to_tree.H.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::graph_to_tree().
|
private |
Definition at line 216 of file graph_to_tree.H.
Referenced by Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::graph_to_tree().
|
private |
Definition at line 215 of file graph_to_tree.H.
Referenced by Aleph::Graph_To_Tree_Node< GT, Key, Convert, SA >::graph_to_tree().