MUQ  0.4.3
NodeNameFinder.cpp
Go to the documentation of this file.
2 
3 using namespace muq::Modeling;
4 
5 NodeNameFinder::NodeNameFinder(std::string const& name, Graph const& graph) : name(name), graph(graph) {}
6 
7 bool NodeNameFinder::operator()(boost::graph_traits<Graph>::vertex_descriptor vertex) const {
8  // check the names
9  return name.compare(graph[vertex]->name)==0;
10 }
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, std::shared_ptr< WorkGraphNode >, std::shared_ptr< WorkGraphEdge > > Graph
Define a directed graph type.
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.