|
1 //======================================================================= |
|
2 // Copyright 1997, 1998, 1999, 2000 University of Notre Dame. |
|
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 * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. |
|
11 */ |
|
12 |
|
13 #include <boost/graph/graph_concepts.hpp> |
|
14 #include <boost/graph/graph_archetypes.hpp> |
|
15 #include <boost/graph/adjacency_list.hpp> |
|
16 #include <boost/graph/filtered_graph.hpp> |
|
17 |
|
18 #ifdef __SYMBIAN32__ |
|
19 #include "std_log_result.h" |
|
20 #define LOG_FILENAME_LINE __FILE__, __LINE__ |
|
21 #endif |
|
22 int main() |
|
23 { |
|
24 using namespace boost; |
|
25 // Check filtered_graph |
|
26 { |
|
27 typedef adjacency_list<vecS, vecS, directedS, |
|
28 no_property, property<edge_residual_capacity_t, long> > Graph; |
|
29 typedef property_map<Graph, edge_residual_capacity_t>::type ResCapMap; |
|
30 typedef filtered_graph<Graph, is_residual_edge<ResCapMap> > ResGraph; |
|
31 typedef graph_traits<ResGraph>::edge_descriptor Edge; |
|
32 |
|
33 function_requires< VertexListGraphConcept<ResGraph> >(); |
|
34 function_requires< EdgeListGraphConcept<ResGraph> >(); |
|
35 function_requires< IncidenceGraphConcept<ResGraph> >(); |
|
36 function_requires< AdjacencyGraphConcept<ResGraph> >(); |
|
37 function_requires< PropertyGraphConcept<ResGraph, Edge, |
|
38 edge_residual_capacity_t> >(); |
|
39 } |
|
40 // Check filtered_graph with bidirectional adjacency_list |
|
41 { |
|
42 typedef adjacency_list<vecS, vecS, bidirectionalS, |
|
43 no_property, property<edge_residual_capacity_t, long> > Graph; |
|
44 typedef property_map<Graph, edge_residual_capacity_t>::type ResCapMap; |
|
45 typedef filtered_graph<Graph, is_residual_edge<ResCapMap> > ResGraph; |
|
46 typedef graph_traits<ResGraph>::edge_descriptor Edge; |
|
47 |
|
48 function_requires< VertexListGraphConcept<ResGraph> >(); |
|
49 function_requires< EdgeListGraphConcept<ResGraph> >(); |
|
50 function_requires< AdjacencyGraphConcept<ResGraph> >(); |
|
51 function_requires< AdjacencyGraphConcept<ResGraph> >(); |
|
52 function_requires< PropertyGraphConcept<ResGraph, Edge, |
|
53 edge_residual_capacity_t> >(); |
|
54 #ifndef __SYMBIAN32__ |
|
55 function_requires< BidirectionalGraphConcept<ResGraph> >(); |
|
56 #endif |
|
57 } |
|
58 |
|
59 #ifdef __SYMBIAN32__ |
|
60 |
|
61 std_log(LOG_FILENAME_LINE,"[End Test Case ]"); |
|
62 |
|
63 testResultXml("filtered_graph_cc"); |
|
64 close_log_file(); |
|
65 #endif |
|
66 return 0; |
|
67 } |