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
15int main(int, char*[])
16{
17 using namespace boost;
18 // Check filtered_graph
19 {
20 typedef adjacency_list< vecS, vecS, directedS, no_property,
21 property< edge_residual_capacity_t, long > >
22 Graph;
23 typedef property_map< Graph, edge_residual_capacity_t >::type ResCapMap;
24 typedef filtered_graph< Graph, is_residual_edge< ResCapMap > > ResGraph;
25 typedef graph_traits< ResGraph >::edge_descriptor Edge;
26
27 BOOST_CONCEPT_ASSERT((VertexListGraphConcept< ResGraph >));
28 BOOST_CONCEPT_ASSERT((EdgeListGraphConcept< ResGraph >));
29 BOOST_CONCEPT_ASSERT((IncidenceGraphConcept< ResGraph >));
30 BOOST_CONCEPT_ASSERT((AdjacencyGraphConcept< ResGraph >));
31 BOOST_CONCEPT_ASSERT(
32 (PropertyGraphConcept< ResGraph, Edge, edge_residual_capacity_t >));
33 }
34 // Check filtered_graph with bidirectional adjacency_list
35 {
36 typedef adjacency_list< vecS, vecS, bidirectionalS, no_property,
37 property< edge_residual_capacity_t, long > >
38 Graph;
39 typedef property_map< Graph, edge_residual_capacity_t >::type ResCapMap;
40 typedef filtered_graph< Graph, is_residual_edge< ResCapMap > > ResGraph;
41 BOOST_CONCEPT_ASSERT((BidirectionalGraphConcept< ResGraph >));
42 }
43 // Check filtered_graph with undirected adjacency_list
44 {
45 typedef adjacency_list< vecS, vecS, undirectedS, no_property,
46 property< edge_residual_capacity_t, long > >
47 Graph;
48 typedef property_map< Graph, edge_residual_capacity_t >::type ResCapMap;
49 typedef filtered_graph< Graph, is_residual_edge< ResCapMap > > ResGraph;
50 BOOST_CONCEPT_ASSERT((BidirectionalGraphConcept< ResGraph >));
51 }
52 return 0;
53}
54

source code of boost/libs/graph/test/filtered_graph_cc.cpp