mirror of
https://github.com/boostorg/graph.git
synced 2025-05-11 05:14:01 +00:00
update for named params
[SVN r9971]
This commit is contained in:
parent
f2810ee881
commit
8faad7f551
36
test/bfs.cpp
36
test/bfs.cpp
@ -150,9 +150,11 @@ struct bfs_test
|
||||
// Create the testing visitor.
|
||||
bfs_testing_visitor<int*,vertex_descriptor*,Graph,
|
||||
boost::default_color_type*>
|
||||
visitor(start, &distance[0], &parent[0], &color[0]);
|
||||
vis(start, &distance[0], &parent[0], &color[0]);
|
||||
|
||||
boost::breadth_first_search(g, start, visitor, &color[0]);
|
||||
boost::breadth_first_search(g, start,
|
||||
visitor(vis).
|
||||
color_map(&color[0]));
|
||||
|
||||
// All white vertices should be unreachable from the source.
|
||||
for (boost::tie(ui, ui_end) = vertices(g); ui != ui_end; ++ui)
|
||||
@ -178,36 +180,6 @@ int test_main(int argc, char* argv[])
|
||||
if (argc > 1)
|
||||
max_V = atoi(argv[1]);
|
||||
|
||||
if (0) { // compile only
|
||||
// Check boost::breadth_first_search() version 1 requirements.
|
||||
typedef boost::default_constructible_archetype<
|
||||
boost::sgi_assignable_archetype<
|
||||
boost::equality_comparable_archetype<> > > Vertex;
|
||||
typedef boost::vertex_list_graph_archetype<Vertex, boost::directed_tag,
|
||||
boost::allow_parallel_edge_tag > VLGraph;
|
||||
typedef boost::property_graph_archetype<VLGraph, boost::vertex_color_t,
|
||||
boost::color_value_archetype> PGraph;
|
||||
PGraph g_arch1;
|
||||
boost::breadth_first_search(g_arch1, Vertex(), boost::bfs_visitor<>());
|
||||
|
||||
// Check boost::breadth_first_search() version 2 requirements.
|
||||
VLGraph g_arch2;
|
||||
typedef boost::read_write_property_map_archetype<Vertex,
|
||||
boost::color_value_archetype > color_map;
|
||||
boost::breadth_first_search(g_arch2, Vertex(), boost::bfs_visitor<>(),
|
||||
color_map());
|
||||
|
||||
// Check boost::breadth_first_search() version 3 requirements.
|
||||
typedef boost::incidence_graph_archetype<Vertex, boost::directed_tag,
|
||||
boost::allow_parallel_edge_tag > IncGraph;
|
||||
IncGraph g_arch3;
|
||||
buffer_archetype<Vertex> buffer;
|
||||
boost::breadth_first_search(g_arch3, Vertex(), buffer,
|
||||
boost::bfs_visitor<>(), color_map());
|
||||
|
||||
}
|
||||
|
||||
|
||||
bfs_test< adjacency_list<vecS, vecS, directedS> >::go(max_V);
|
||||
bfs_test< adjacency_list<vecS, vecS, undirectedS> >::go(max_V);
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user