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