1 //=======================================================================
2 // Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
3 // Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
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>
17 using namespace boost
;
18 // Check filtered_graph
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
;
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
> ));
33 // Check filtered_graph with bidirectional adjacency_list
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
> ));
41 // Check filtered_graph with undirected adjacency_list
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
> ));