]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/graph/test/dfs_cc.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / graph / test / dfs_cc.cpp
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
14 int main()
15 {
16 using namespace boost;
17 typedef default_constructible_archetype<
18 sgi_assignable_archetype<
19 equality_comparable_archetype<> > > vertex_t;
20 {
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();
26 read_write_property_map_archetype<vertex_t, color_value_archetype> color;
27 depth_first_search(g, color_map(color));
28 }
29 {
30 typedef incidence_graph_archetype<vertex_t, directed_tag,
31 allow_parallel_edge_tag> IncidenceGraph;
32 typedef vertex_list_graph_archetype<vertex_t, directed_tag,
33 allow_parallel_edge_tag, IncidenceGraph> graph_t;
34 graph_t& g = static_object<graph_t>::get();
35 readable_property_map_archetype<vertex_t, std::size_t> v_index;
36 depth_first_search(g, vertex_index_map(v_index));
37 }
38 {
39 typedef incidence_graph_archetype<vertex_t, undirected_tag,
40 allow_parallel_edge_tag> IncidenceGraph;
41 typedef vertex_list_graph_archetype<vertex_t, undirected_tag,
42 allow_parallel_edge_tag, IncidenceGraph> Graph;
43 typedef property_graph_archetype<Graph, vertex_index_t, std::size_t>
44 graph_t;
45 graph_t& g = static_object<graph_t>::get();
46 dfs_visitor<> v;
47 depth_first_search(g, visitor(v));
48 }
49 return 0;
50 }