Commit 736d6910 authored by Tiago Peixoto's avatar Tiago Peixoto

Fix bug in shortest_distance() with filtered graphs.

This fixes a bug where the distance map was not properly initialized
when the graph is filtered, and the all pairs shortest paths are
requested.
parent d5ff8f90
......@@ -40,11 +40,8 @@ struct do_all_pairs_search
#pragma omp parallel for default(shared) private(i) schedule(dynamic)
for (i = 0; i < N; ++i)
{
typename graph_traits<Graph>::vertex_descriptor v = vertex(i, g);
if (v == graph_traits<Graph>::null_vertex())
continue;
dist_map[v].clear();
dist_map[v].resize(num_vertices(g), 0);
dist_map[i].clear();
dist_map[i].resize(num_vertices(g), 0);
}
if (dense)
......
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