Commit dcc3a3f1 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Fix weighted shortest_distance() when a target is given

This fixes #188
parent 5229271f
......@@ -89,16 +89,12 @@ public:
{
if (_dist_map[u] > _max_dist)
throw stop_search();
}
template <class Graph>
void discover_vertex(typename graph_traits<Graph>::vertex_descriptor u,
Graph&)
{
if (u == _target)
throw stop_search();
}
private:
DistMap _dist_map;
typename property_traits<DistMap>::value_type _max_dist;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment