Update contrib.
1 //=======================================================================
2 // Copyright 2002 Indiana University.
3 // Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
5 // Distributed under the Boost Software License, Version 1.0. (See
6 // accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
8 //=======================================================================
10 #include <boost/concept_archetype.hpp>
11 #include <boost/graph/breadth_first_search.hpp>
12 #include <boost/graph/graph_archetypes.hpp>
16 using namespace boost;
17 typedef default_constructible_archetype<
18 sgi_assignable_archetype<
19 equality_comparable_archetype<> > > vertex_t;
21 typedef incidence_graph_archetype<vertex_t, directed_tag,
22 allow_parallel_edge_tag> IncidenceGraph;
23 typedef vertex_list_graph_archetype<vertex_t, directed_tag,
24 allow_parallel_edge_tag, IncidenceGraph> graph_t;
25 graph_t& g = static_object<graph_t>::get();
27 read_write_property_map_archetype<vertex_t, color_value_archetype> color;
28 breadth_first_search(g, s, color_map(color));
31 typedef incidence_graph_archetype<vertex_t, directed_tag,
32 allow_parallel_edge_tag> IncidenceGraph;
33 typedef vertex_list_graph_archetype<vertex_t, directed_tag,
34 allow_parallel_edge_tag, IncidenceGraph> graph_t;
35 graph_t& g = static_object<graph_t>::get();
37 readable_property_map_archetype<vertex_t, std::size_t> v_index;
38 breadth_first_search(g, s, vertex_index_map(v_index));
41 typedef incidence_graph_archetype<vertex_t, undirected_tag,
42 allow_parallel_edge_tag> IncidenceGraph;
43 typedef vertex_list_graph_archetype<vertex_t, undirected_tag,
44 allow_parallel_edge_tag, IncidenceGraph> Graph;
45 typedef property_graph_archetype<Graph, vertex_index_t, std::size_t>
47 graph_t& g = static_object<graph_t>::get();
50 buffer_archetype<vertex_t> b;
51 breadth_first_search(g, s, visitor(v).buffer(b));