sl@0
|
1 |
//=======================================================================
|
sl@0
|
2 |
// Copyright 2002 Indiana University.
|
sl@0
|
3 |
// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
|
sl@0
|
4 |
//
|
sl@0
|
5 |
// Distributed under the Boost Software License, Version 1.0. (See
|
sl@0
|
6 |
// accompanying file LICENSE_1_0.txt or copy at
|
sl@0
|
7 |
// http://www.boost.org/LICENSE_1_0.txt)
|
sl@0
|
8 |
//=======================================================================
|
sl@0
|
9 |
/*
|
sl@0
|
10 |
* © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved.
|
sl@0
|
11 |
*/
|
sl@0
|
12 |
|
sl@0
|
13 |
#include <boost/concept_archetype.hpp>
|
sl@0
|
14 |
#include <boost/graph/depth_first_search.hpp>
|
sl@0
|
15 |
#include <boost/graph/graph_archetypes.hpp>
|
sl@0
|
16 |
#ifdef __SYMBIAN32__
|
sl@0
|
17 |
#include "std_log_result.h"
|
sl@0
|
18 |
#define LOG_FILENAME_LINE __FILE__, __LINE__
|
sl@0
|
19 |
#endif
|
sl@0
|
20 |
int main()
|
sl@0
|
21 |
{
|
sl@0
|
22 |
using namespace boost;
|
sl@0
|
23 |
typedef default_constructible_archetype<
|
sl@0
|
24 |
sgi_assignable_archetype<
|
sl@0
|
25 |
equality_comparable_archetype<> > > vertex_t;
|
sl@0
|
26 |
{
|
sl@0
|
27 |
typedef incidence_graph_archetype<vertex_t, directed_tag,
|
sl@0
|
28 |
allow_parallel_edge_tag> IncidenceGraph;
|
sl@0
|
29 |
typedef vertex_list_graph_archetype<vertex_t, directed_tag,
|
sl@0
|
30 |
allow_parallel_edge_tag, IncidenceGraph> graph_t;
|
sl@0
|
31 |
graph_t& g = static_object<graph_t>::get();
|
sl@0
|
32 |
read_write_property_map_archetype<vertex_t, color_value_archetype> color;
|
sl@0
|
33 |
depth_first_search(g, color_map(color));
|
sl@0
|
34 |
}
|
sl@0
|
35 |
{
|
sl@0
|
36 |
typedef incidence_graph_archetype<vertex_t, directed_tag,
|
sl@0
|
37 |
allow_parallel_edge_tag> IncidenceGraph;
|
sl@0
|
38 |
typedef vertex_list_graph_archetype<vertex_t, directed_tag,
|
sl@0
|
39 |
allow_parallel_edge_tag, IncidenceGraph> graph_t;
|
sl@0
|
40 |
graph_t& g = static_object<graph_t>::get();
|
sl@0
|
41 |
readable_property_map_archetype<vertex_t, std::size_t> v_index;
|
sl@0
|
42 |
depth_first_search(g, vertex_index_map(v_index));
|
sl@0
|
43 |
}
|
sl@0
|
44 |
{
|
sl@0
|
45 |
typedef incidence_graph_archetype<vertex_t, undirected_tag,
|
sl@0
|
46 |
allow_parallel_edge_tag> IncidenceGraph;
|
sl@0
|
47 |
typedef vertex_list_graph_archetype<vertex_t, undirected_tag,
|
sl@0
|
48 |
allow_parallel_edge_tag, IncidenceGraph> Graph;
|
sl@0
|
49 |
typedef property_graph_archetype<Graph, vertex_index_t, std::size_t>
|
sl@0
|
50 |
graph_t;
|
sl@0
|
51 |
graph_t& g = static_object<graph_t>::get();
|
sl@0
|
52 |
dfs_visitor<> v;
|
sl@0
|
53 |
depth_first_search(g, visitor(v));
|
sl@0
|
54 |
}
|
sl@0
|
55 |
|
sl@0
|
56 |
#ifdef __SYMBIAN32__
|
sl@0
|
57 |
std_log(LOG_FILENAME_LINE,"[End Test Case ]");
|
sl@0
|
58 |
|
sl@0
|
59 |
testResultXml("dfs_cc");
|
sl@0
|
60 |
close_log_file();
|
sl@0
|
61 |
#endif
|
sl@0
|
62 |
return 0;
|
sl@0
|
63 |
}
|