MUQ  0.4.3
NodeNameFinder.h
Go to the documentation of this file.
1 #ifndef NODENAMEFINDER_H_
2 #define NODENAMEFINDER_H_
3 
4 #include <boost/graph/adjacency_list.hpp>
5 
8 
9 namespace muq {
10  namespace Modeling {
11 
13  typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, std::shared_ptr<WorkGraphNode>, std::shared_ptr<WorkGraphEdge> > Graph;
14 
16  struct NodeNameFinder {
17  public:
18 
23  NodeNameFinder(std::string const& name, Graph const& graph);
24 
26 
30  bool operator()(boost::graph_traits<Graph>::vertex_descriptor vertex) const;
31 
33  const std::string name;
34 
36  Graph const& graph;
37  };
38  } // namespace Modeling
39 } // namespace muq
40 
41 #endif
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, std::shared_ptr< WorkGraphNode >, std::shared_ptr< WorkGraphEdge > > Graph
Define a directed graph type.
A helper struct that determines if a node in the graph has a given name.
Graph const & graph
This graph stores the vertices.
NodeNameFinder(std::string const &name, Graph const &graph)
const std::string name
We are looking for vertices with this name.
bool operator()(boost::graph_traits< Graph >::vertex_descriptor vertex) const
Does a given vertex have the same name as the given name.