Go to the documentation of this file.
36 #ifndef TTA_GRAPH_UTILITIES_HH
37 #define TTA_GRAPH_UTILITIES_HH
50 template<
typename Graph,
typename GraphNode>
78 template<
typename Graph,
typename GraphEdge>
124 template<
typename Graph,
typename GraphNode>
137 template<
typename Graph,
typename GraphEdge>
GraphNodeFunctor(const Graph &pGraph)
Constructor. Keep record of the parent graph of the nodes to work on.
virtual void operator()(GraphEdge &) const =0
Operation to apply to a given edge of the graph.
virtual void operator()(GraphNode &) const =0
Operation to apply to a given node of the graph.
const Graph * graph_
Expected parent graph.
void doOnAllNodes(Graph &pGraph, const GraphNodeFunctor< Graph, GraphNode > &functor)
void doOnAllEdges(Graph &pGraph, const GraphEdgeFunctor< Graph, GraphEdge > &functor)
T * operator()(const T *element)
GraphEdgeFunctor(const Graph &pGraph)
Constructor. Keep record of the parent graph of the nodes to work on.
virtual ~GraphEdgeFunctor()
Destructor. Subclasses should clean up any state created during operation in this method.
const Graph * graph_
Expected parent graph.
virtual ~GraphNodeFunctor()
Destructor. Subclasses should clean up any state created during operation in this method.