|
Boost Users : |
Subject: [Boost-users] [BGL] visitors.hpp:138: error: no type named 'event_filter' in 'class dijkstra_custom_visitor'
From: The Maschine (justthemaschine_at_[hidden])
Date: 2013-11-21 04:53:32
Hi, Im trying to use a custom visitor but I get this error.
My custom visitor is:
class dijkstra_custom_visitor : public boost::default_dijkstra_visitor
{
public:
dijkstra_threshold(glm::dvec3 source, double threshold):
s(source), threshold(threshold) {}
struct hit_threshold {};
void examine_vertex(boost::graph_traits
<unGraph>::vertex_descriptor v, const unGraph& g) {
glm::dvec3 dest = boost::get(&VertexProperties::m_mid_point, g, v);
if( glm::distance(s,dest) > threshold ) throw hit_threshold();
}
double threshold;
glm::dvec3 s;
};
My 'calling' line is:
std::vector<Vertex> predecessors(boost::num_vertices(m_ugraph));
std::vector<Weight>
distances(boost::num_vertices(m_ugraph),
std::numeric_limits<double>::max() );
IndexMap indexMap = boost::get(boost::vertex_index, m_ugraph);
PredecessorMap predecessorMap(&predecessors[0], indexMap);
DistanceMap distanceMap(&distances[0], indexMap);
glm::dvec3 s_mid = m_ugraph[*vertex_iterator_begin].m_mid_point;
double thres = 500.0f;
boost::dijkstra_shortest_paths(m_ugraph,
*vertex_iterator_begin,
boost::predecessor_map(predecessorMap).distance_map(distanceMap).visitor(boost::make_dijkstra_visitor(dijkstra_custom_visitor(s_mid,thres))));
What do you think is the problem?
thanks
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net