]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/graph/test/filtered_graph_cc.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / graph / test / filtered_graph_cc.cpp
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 #include <boost/graph/graph_concepts.hpp>
10 #include <boost/graph/graph_archetypes.hpp>
11 #include <boost/graph/adjacency_list.hpp>
12 #include <boost/graph/filtered_graph.hpp>
13 #include <boost/concept/assert.hpp>
14
15 int main(int,char*[])
16 {
17 using namespace boost;
18 // Check filtered_graph
19 {
20 typedef adjacency_list<vecS, vecS, directedS,
21 no_property, property<edge_residual_capacity_t, long> > Graph;
22 typedef property_map<Graph, edge_residual_capacity_t>::type ResCapMap;
23 typedef filtered_graph<Graph, is_residual_edge<ResCapMap> > ResGraph;
24 typedef graph_traits<ResGraph>::edge_descriptor Edge;
25
26 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<ResGraph> ));
27 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<ResGraph> ));
28 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<ResGraph> ));
29 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<ResGraph> ));
30 BOOST_CONCEPT_ASSERT(( PropertyGraphConcept<ResGraph, Edge,
31 edge_residual_capacity_t> ));
32 }
33 // Check filtered_graph with bidirectional adjacency_list
34 {
35 typedef adjacency_list<vecS, vecS, bidirectionalS,
36 no_property, property<edge_residual_capacity_t, long> > Graph;
37 typedef property_map<Graph, edge_residual_capacity_t>::type ResCapMap;
38 typedef filtered_graph<Graph, is_residual_edge<ResCapMap> > ResGraph;
39 BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<ResGraph> ));
40 }
41 // Check filtered_graph with undirected adjacency_list
42 {
43 typedef adjacency_list<vecS, vecS, undirectedS,
44 no_property, property<edge_residual_capacity_t, long> > Graph;
45 typedef property_map<Graph, edge_residual_capacity_t>::type ResCapMap;
46 typedef filtered_graph<Graph, is_residual_edge<ResCapMap> > ResGraph;
47 BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<ResGraph> ));
48 }
49 return 0;
50 }