1 //=======================================================================
2 // Copyright 2002 Indiana University.
3 // Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
4 //
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 //=======================================================================
9
10 #include <boost/concept_archetype.hpp>
11 #include <boost/graph/depth_first_search.hpp>
12 #include <boost/graph/graph_archetypes.hpp>
13
main()14 int main()
15 {
16 using namespace boost;
17 typedef default_constructible_archetype<
18 sgi_assignable_archetype< equality_comparable_archetype<> > >
19 vertex_t;
20 {
21 typedef incidence_graph_archetype< vertex_t, directed_tag,
22 allow_parallel_edge_tag >
23 IncidenceGraph;
24 typedef vertex_list_graph_archetype< vertex_t, directed_tag,
25 allow_parallel_edge_tag, IncidenceGraph >
26 graph_t;
27 graph_t& g = static_object< graph_t >::get();
28 read_write_property_map_archetype< vertex_t, color_value_archetype >
29 color;
30 depth_first_search(g, color_map(color));
31 }
32 {
33 typedef incidence_graph_archetype< vertex_t, directed_tag,
34 allow_parallel_edge_tag >
35 IncidenceGraph;
36 typedef vertex_list_graph_archetype< vertex_t, directed_tag,
37 allow_parallel_edge_tag, IncidenceGraph >
38 graph_t;
39 graph_t& g = static_object< graph_t >::get();
40 readable_property_map_archetype< vertex_t, std::size_t > v_index;
41 depth_first_search(g, vertex_index_map(v_index));
42 }
43 {
44 typedef incidence_graph_archetype< vertex_t, undirected_tag,
45 allow_parallel_edge_tag >
46 IncidenceGraph;
47 typedef vertex_list_graph_archetype< vertex_t, undirected_tag,
48 allow_parallel_edge_tag, IncidenceGraph >
49 Graph;
50 typedef property_graph_archetype< Graph, vertex_index_t, std::size_t >
51 graph_t;
52 graph_t& g = static_object< graph_t >::get();
53 dfs_visitor<> v;
54 depth_first_search(g, visitor(v));
55 }
56 return 0;
57 }
58