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

bfs_search(): honor initialize_vertex() from visitor

This fixes issue #729.
parent 1fa4fea4
Pipeline #960 failed with stage
in 460 minutes
......@@ -114,6 +114,9 @@ void do_bfs(Graph& g, size_t s, Visitor&& vis)
auto v = vertex(s, g);
if (v == graph_traits<Graph>::null_vertex())
{
for (auto u : vertices_range(g))
vis.initialize_vertex(u, g);
for (auto u : vertices_range(g))
{
if (color[u] == color_traits<default_color_type>::black())
......@@ -123,7 +126,7 @@ void do_bfs(Graph& g, size_t s, Visitor&& vis)
}
else
{
breadth_first_visit(g, v, visitor(vis).color_map(color));
breadth_first_search(g, v, visitor(vis).color_map(color));
}
}
......
Supports Markdown
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