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_matrix.hpp>
12 #include <boost/concept/assert.hpp>
13
main(int,char * [])14 int main(int,char*[])
15 {
16 using namespace boost;
17 // Check adjacency_matrix without properties
18 {
19 typedef adjacency_matrix<directedS> Graph;
20 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> ));
21 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph> ));
22 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> ));
23 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> ));
24 BOOST_CONCEPT_ASSERT(( MutableGraphConcept<Graph> ));
25 BOOST_CONCEPT_ASSERT(( AdjacencyMatrixConcept<Graph> ));
26 }
27 {
28 typedef adjacency_matrix<undirectedS> Graph;
29 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> ));
30 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph> ));
31 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> ));
32 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> ));
33 BOOST_CONCEPT_ASSERT(( MutableGraphConcept<Graph> ));
34 BOOST_CONCEPT_ASSERT(( AdjacencyMatrixConcept<Graph> ));
35 }
36 // Check adjacency_matrix with properties
37 {
38 typedef adjacency_matrix<directedS,
39 property<vertex_color_t, int>,
40 property<edge_weight_t, float> > Graph;
41 typedef graph_traits<Graph>::vertex_descriptor Vertex;
42 typedef graph_traits<Graph>::edge_descriptor Edge;
43 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> ));
44 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph> ));
45 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> ));
46 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> ));
47 BOOST_CONCEPT_ASSERT(( AdjacencyMatrixConcept<Graph> ));
48 BOOST_CONCEPT_ASSERT(( VertexMutablePropertyGraphConcept<Graph> ));
49 BOOST_CONCEPT_ASSERT(( EdgeMutablePropertyGraphConcept<Graph> ));
50 BOOST_CONCEPT_ASSERT(( ReadablePropertyGraphConcept<Graph,
51 Vertex, vertex_index_t> ));
52 BOOST_CONCEPT_ASSERT(( PropertyGraphConcept<Graph, Vertex, vertex_color_t> ));
53 BOOST_CONCEPT_ASSERT(( PropertyGraphConcept<Graph, Edge, edge_weight_t> ));
54 }
55 {
56 typedef adjacency_matrix<undirectedS,
57 property<vertex_color_t, int>,
58 property<edge_weight_t, float> > Graph;
59 typedef graph_traits<Graph>::vertex_descriptor Vertex;
60 typedef graph_traits<Graph>::edge_descriptor Edge;
61 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> ));
62 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph> ));
63 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> ));
64 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> ));
65 BOOST_CONCEPT_ASSERT(( AdjacencyMatrixConcept<Graph> ));
66 BOOST_CONCEPT_ASSERT(( VertexMutablePropertyGraphConcept<Graph> ));
67 BOOST_CONCEPT_ASSERT(( EdgeMutablePropertyGraphConcept<Graph> ));
68 BOOST_CONCEPT_ASSERT(( ReadablePropertyGraphConcept<Graph,
69 Vertex, vertex_index_t> ));
70 BOOST_CONCEPT_ASSERT(( PropertyGraphConcept<Graph, Vertex, vertex_color_t> ));
71 BOOST_CONCEPT_ASSERT(( PropertyGraphConcept<Graph, Edge, edge_weight_t> ));
72 }
73 return 0;
74 }
75