Ticket #6293: graph-library-boost-concept-assert.patch
File graph-library-boost-concept-assert.patch, 133.3 KB (added by , 11 years ago) |
---|
-
boost/graph/clustering_coefficient.hpp
11 11 #include <boost/graph/graph_traits.hpp> 12 12 #include <boost/graph/graph_concepts.hpp> 13 13 #include <boost/graph/lookup_edge.hpp> 14 #include <boost/concept/assert.hpp> 14 15 15 16 namespace boost 16 17 { … … 20 21 inline typename graph_traits<Graph>::degree_size_type 21 22 possible_edges(const Graph& g, std::size_t k, directed_tag) 22 23 { 23 function_requires< GraphConcept<Graph> >();24 BOOST_CONCEPT_ASSERT(( GraphConcept<Graph> )); 24 25 typedef typename graph_traits<Graph>::degree_size_type T; 25 26 return T(k) * (T(k) - 1); 26 27 } … … 42 43 directed_tag) 43 44 44 45 { 45 function_requires< AdjacencyMatrixConcept<Graph> >();46 BOOST_CONCEPT_ASSERT(( AdjacencyMatrixConcept<Graph> )); 46 47 return (lookup_edge(u, v, g).second ? 1 : 0) + 47 48 (lookup_edge(v, u, g).second ? 1 : 0); 48 49 } … … 55 56 typename graph_traits<Graph>::vertex_descriptor v, 56 57 undirected_tag) 57 58 { 58 function_requires< AdjacencyMatrixConcept<Graph> >();59 BOOST_CONCEPT_ASSERT(( AdjacencyMatrixConcept<Graph> )); 59 60 return lookup_edge(u, v, g).second ? 1 : 0; 60 61 } 61 62 } … … 64 65 inline typename graph_traits<Graph>::degree_size_type 65 66 num_paths_through_vertex(const Graph& g, Vertex v) 66 67 { 67 function_requires< AdjacencyGraphConcept<Graph> >();68 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> )); 68 69 typedef typename graph_traits<Graph>::directed_category Directed; 69 70 typedef typename graph_traits<Graph>::adjacency_iterator AdjacencyIterator; 70 71 … … 81 82 inline typename graph_traits<Graph>::degree_size_type 82 83 num_triangles_on_vertex(const Graph& g, Vertex v) 83 84 { 84 function_requires< IncidenceGraphConcept<Graph> >();85 function_requires< AdjacencyGraphConcept<Graph> >();85 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> )); 86 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> )); 86 87 typedef typename graph_traits<Graph>::degree_size_type Degree; 87 88 typedef typename graph_traits<Graph>::directed_category Directed; 88 89 typedef typename graph_traits<Graph>::adjacency_iterator AdjacencyIterator; … … 119 120 inline typename property_traits<ClusteringMap>::value_type 120 121 all_clustering_coefficients(const Graph& g, ClusteringMap cm) 121 122 { 122 function_requires< VertexListGraphConcept<Graph> >();123 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 123 124 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 124 125 typedef typename graph_traits<Graph>::vertex_iterator VertexIterator; 125 function_requires< WritablePropertyMapConcept<ClusteringMap,Vertex> >();126 BOOST_CONCEPT_ASSERT(( WritablePropertyMapConcept<ClusteringMap,Vertex> )); 126 127 typedef typename property_traits<ClusteringMap>::value_type Coefficient; 127 128 128 129 Coefficient sum(0); … … 139 140 inline typename property_traits<ClusteringMap>::value_type 140 141 mean_clustering_coefficient(const Graph& g, ClusteringMap cm) 141 142 { 142 function_requires< VertexListGraphConcept<Graph> >();143 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 143 144 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 144 145 typedef typename graph_traits<Graph>::vertex_iterator VertexIterator; 145 function_requires< ReadablePropertyMapConcept<ClusteringMap,Vertex> >();146 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<ClusteringMap,Vertex> )); 146 147 typedef typename property_traits<ClusteringMap>::value_type Coefficient; 147 148 148 149 Coefficient cc(0); -
boost/graph/bellman_ford_shortest_paths.hpp
29 29 #include <boost/graph/relax.hpp> 30 30 #include <boost/graph/visitors.hpp> 31 31 #include <boost/graph/named_function_params.hpp> 32 #include <boost/concept/assert.hpp> 32 33 33 34 namespace boost { 34 35 35 36 template <class Visitor, class Graph> 36 37 struct BellmanFordVisitorConcept { 37 38 void constraints() { 38 function_requires< CopyConstructibleConcept<Visitor> >();39 BOOST_CONCEPT_ASSERT(( CopyConstructibleConcept<Visitor> )); 39 40 vis.examine_edge(e, g); 40 41 vis.edge_relaxed(e, g); 41 42 vis.edge_not_relaxed(e, g); … … 95 96 BinaryPredicate compare, 96 97 BellmanFordVisitor v) 97 98 { 98 function_requires<EdgeListGraphConcept<EdgeListGraph> >();99 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<EdgeListGraph> )); 99 100 typedef graph_traits<EdgeListGraph> GTraits; 100 101 typedef typename GTraits::edge_descriptor Edge; 101 102 typedef typename GTraits::vertex_descriptor Vertex; 102 function_requires<ReadWritePropertyMapConcept<DistanceMap, Vertex> >();103 function_requires<ReadablePropertyMapConcept<WeightMap, Edge> >();103 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<DistanceMap, Vertex> )); 104 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<WeightMap, Edge> )); 104 105 typedef typename property_traits<DistanceMap>::value_type D_value; 105 106 typedef typename property_traits<WeightMap>::value_type W_value; 106 107 … … 229 230 (VertexAndEdgeListGraph& g, 230 231 const bgl_named_params<P, T, R>& params) 231 232 { 232 function_requires<VertexListGraphConcept<VertexAndEdgeListGraph> >();233 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<VertexAndEdgeListGraph> )); 233 234 return detail::bellman_dispatch 234 235 (g, num_vertices(g), 235 236 choose_const_pmap(get_param(params, edge_weight), g, edge_weight), -
boost/graph/bron_kerbosch_all_cliques.hpp
11 11 #include <deque> 12 12 #include <boost/config.hpp> 13 13 14 #include <boost/concept/assert.hpp> 15 14 16 #include <boost/graph/graph_concepts.hpp> 15 17 #include <boost/graph/lookup_edge.hpp> 16 18 … … 151 153 const Container& in, 152 154 Container& out) 153 155 { 154 function_requires< GraphConcept<Graph> >();156 BOOST_CONCEPT_ASSERT(( GraphConcept<Graph> )); 155 157 156 158 typename graph_traits<Graph>::directed_category cat; 157 159 typename Container::const_iterator i, end = in.end(); … … 174 176 Visitor vis, 175 177 std::size_t min) 176 178 { 177 function_requires< GraphConcept<Graph> >();178 function_requires< CliqueVisitorConcept<Visitor,Clique,Graph> >();179 BOOST_CONCEPT_ASSERT(( GraphConcept<Graph> )); 180 BOOST_CONCEPT_ASSERT(( CliqueVisitorConcept<Visitor,Clique,Graph> )); 179 181 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 180 182 181 183 // Is there vertex in nots that is connected to all vertices … … 266 268 inline void 267 269 bron_kerbosch_all_cliques(const Graph& g, Visitor vis, std::size_t min) 268 270 { 269 function_requires< IncidenceGraphConcept<Graph> >();270 function_requires< VertexListGraphConcept<Graph> >();271 function_requires< VertexIndexGraphConcept<Graph> >();272 function_requires< AdjacencyMatrixConcept<Graph> >(); // Structural requirement only271 BOOST_CONCEPT_ASSERT< IncidenceGraphConcept<Graph> )); 272 BOOST_CONCEPT_ASSERT< VertexListGraphConcept<Graph> )); 273 BOOST_CONCEPT_ASSERT< VertexIndexGraphConcept<Graph> )); 274 BOOST_CONCEPT_ASSERT< AdjacencyMatrixConcept<Graph> )); // Structural requirement only 273 275 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 274 276 typedef typename graph_traits<Graph>::vertex_iterator VertexIterator; 275 277 typedef std::vector<Vertex> VertexSet; 276 278 typedef std::deque<Vertex> Clique; 277 function_requires< CliqueVisitorConcept<Visitor,Clique,Graph> >();279 BOOST_CONCEPT_ASSERT< CliqueVisitorConcept<Visitor,Clique,Graph> )); 278 280 279 281 // NOTE: We're using a deque to implement the clique, because it provides 280 282 // constant inserts and removals at the end and also a constant size. -
boost/graph/undirected_dfs.hpp
13 13 14 14 #include <boost/graph/depth_first_search.hpp> 15 15 #include <vector> 16 #include <boost/concept/assert.hpp> 16 17 17 18 namespace boost { 18 19 … … 32 33 VertexColorMap vertex_color, 33 34 EdgeColorMap edge_color) 34 35 { 35 function_requires<IncidenceGraphConcept<IncidenceGraph> >();36 function_requires<DFSVisitorConcept<DFSVisitor, IncidenceGraph> >();36 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<IncidenceGraph> )); 37 BOOST_CONCEPT_ASSERT(( DFSVisitorConcept<DFSVisitor, IncidenceGraph> )); 37 38 typedef typename graph_traits<IncidenceGraph>::vertex_descriptor Vertex; 38 39 typedef typename graph_traits<IncidenceGraph>::edge_descriptor Edge; 39 function_requires<ReadWritePropertyMapConcept<VertexColorMap,Vertex> >();40 function_requires<ReadWritePropertyMapConcept<EdgeColorMap,Edge> >();40 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<VertexColorMap,Vertex> )); 41 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<EdgeColorMap,Edge> )); 41 42 typedef typename property_traits<VertexColorMap>::value_type ColorValue; 42 43 typedef typename property_traits<EdgeColorMap>::value_type EColorValue; 43 function_requires< ColorValueConcept<ColorValue> >();44 function_requires< ColorValueConcept<EColorValue> >();44 BOOST_CONCEPT_ASSERT(( ColorValueConcept<ColorValue> )); 45 BOOST_CONCEPT_ASSERT(( ColorValueConcept<EColorValue> )); 45 46 typedef color_traits<ColorValue> Color; 46 47 typedef color_traits<EColorValue> EColor; 47 48 typedef typename graph_traits<IncidenceGraph>::out_edge_iterator Iter; … … 94 95 VertexColorMap vertex_color, 95 96 EdgeColorMap edge_color) 96 97 { 97 function_requires<IncidenceGraphConcept<IncidenceGraph> >();98 function_requires<DFSVisitorConcept<DFSVisitor, IncidenceGraph> >();98 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<IncidenceGraph> )); 99 BOOST_CONCEPT_ASSERT(( DFSVisitorConcept<DFSVisitor, IncidenceGraph> )); 99 100 typedef typename graph_traits<IncidenceGraph>::vertex_descriptor Vertex; 100 101 typedef typename graph_traits<IncidenceGraph>::edge_descriptor Edge; 101 function_requires<ReadWritePropertyMapConcept<VertexColorMap,Vertex> >();102 function_requires<ReadWritePropertyMapConcept<EdgeColorMap,Edge> >();102 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<VertexColorMap,Vertex> )); 103 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<EdgeColorMap,Edge> )); 103 104 typedef typename property_traits<VertexColorMap>::value_type ColorValue; 104 105 typedef typename property_traits<EdgeColorMap>::value_type EColorValue; 105 function_requires< ColorValueConcept<ColorValue> >();106 function_requires< ColorValueConcept<EColorValue> >();106 BOOST_CONCEPT_ASSERT(( ColorValueConcept<ColorValue> )); 107 BOOST_CONCEPT_ASSERT(( ColorValueConcept<EColorValue> )); 107 108 typedef color_traits<ColorValue> Color; 108 109 typedef color_traits<EColorValue> EColor; 109 110 typename graph_traits<IncidenceGraph>::out_edge_iterator ei, ei_end; … … 134 135 VertexColorMap vertex_color, EdgeColorMap edge_color, 135 136 Vertex start_vertex) 136 137 { 137 function_requires<DFSVisitorConcept<DFSVisitor, Graph> >();138 function_requires<EdgeListGraphConcept<Graph> >();138 BOOST_CONCEPT_ASSERT(( DFSVisitorConcept<DFSVisitor, Graph> )); 139 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph> )); 139 140 140 141 typedef typename property_traits<VertexColorMap>::value_type ColorValue; 141 142 typedef color_traits<ColorValue> Color; -
boost/graph/boykov_kolmogorov_max_flow.hpp
47 47 #include <boost/graph/graph_concepts.hpp> 48 48 #include <boost/graph/named_function_params.hpp> 49 49 #include <boost/graph/lookup_edge.hpp> 50 #include <boost/concept/assert.hpp> 50 51 51 52 // The algorithm impelemented here is described in: 52 53 // … … 743 744 typedef typename graph_traits<Graph>::edge_descriptor edge_descriptor; 744 745 745 746 //as this method is the last one before we instantiate the solver, we do the concept checks here 746 function_requires<VertexListGraphConcept<Graph> >(); //to have vertices(), num_vertices(),747 function_requires<EdgeListGraphConcept<Graph> >(); //to have edges()748 function_requires<IncidenceGraphConcept<Graph> >(); //to have source(), target() and out_edges()749 function_requires<ReadablePropertyMapConcept<CapacityEdgeMap, edge_descriptor> >(); //read flow-values from edges750 function_requires<ReadWritePropertyMapConcept<ResidualCapacityEdgeMap, edge_descriptor> >(); //write flow-values to residuals751 function_requires<ReadablePropertyMapConcept<ReverseEdgeMap, edge_descriptor> >(); //read out reverse edges752 function_requires<ReadWritePropertyMapConcept<PredecessorMap, vertex_descriptor> >(); //store predecessor there753 function_requires<ReadWritePropertyMapConcept<ColorMap, vertex_descriptor> >(); //write corresponding tree754 function_requires<ReadWritePropertyMapConcept<DistanceMap, vertex_descriptor> >(); //write distance to source/sink755 function_requires<ReadablePropertyMapConcept<IndexMap, vertex_descriptor> >(); //get index 0...|V|-1747 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); //to have vertices(), num_vertices(), 748 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph> )); //to have edges() 749 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> )); //to have source(), target() and out_edges() 750 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<CapacityEdgeMap, edge_descriptor> )); //read flow-values from edges 751 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<ResidualCapacityEdgeMap, edge_descriptor> )); //write flow-values to residuals 752 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<ReverseEdgeMap, edge_descriptor> )); //read out reverse edges 753 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<PredecessorMap, vertex_descriptor> )); //store predecessor there 754 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<ColorMap, vertex_descriptor> )); //write corresponding tree 755 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<DistanceMap, vertex_descriptor> )); //write distance to source/sink 756 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<IndexMap, vertex_descriptor> )); //get index 0...|V|-1 756 757 BOOST_ASSERT(num_vertices(g) >= 2 && src != sink); 757 758 758 759 detail::bk_max_flow< -
boost/graph/tiernan_all_cycles.hpp
13 13 #include <boost/graph/graph_concepts.hpp> 14 14 #include <boost/graph/graph_traits.hpp> 15 15 #include <boost/graph/properties.hpp> 16 #include <boost/concept/assert.hpp> 16 17 17 18 #include <boost/concept/detail/concept_def.hpp> 18 19 namespace boost { … … 156 157 const Path& p, 157 158 const ClosedMatrix& m) 158 159 { 159 function_requires< IncidenceGraphConcept<Graph> >();160 function_requires< VertexIndexGraphConcept<Graph> >();160 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> )); 161 BOOST_CONCEPT_ASSERT(( VertexIndexGraphConcept<Graph> )); 161 162 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 162 163 163 164 // get the vertices in question … … 181 182 inline bool 182 183 can_wrap_path(const Graph& g, const Path& p) 183 184 { 184 function_requires< IncidenceGraphConcept<Graph> >();185 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> )); 185 186 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 186 187 typedef typename graph_traits<Graph>::out_edge_iterator OutIterator; 187 188 … … 209 210 Path& p, 210 211 ClosedMatrix& closed) 211 212 { 212 function_requires< IncidenceGraphConcept<Graph> >();213 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> )); 213 214 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 214 215 typedef typename graph_traits<Graph>::edge_descriptor Edge; 215 216 typedef typename graph_traits<Graph>::out_edge_iterator OutIterator; … … 238 239 inline bool 239 240 exhaust_paths(const Graph& g, Path& p, ClosedMatrix& closed) 240 241 { 241 function_requires< GraphConcept<Graph> >();242 BOOST_CONCEPT_ASSERT(( GraphConcept<Graph> )); 242 243 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 243 244 244 245 // if there's more than one vertex in the path, this closes … … 272 273 std::size_t minlen, 273 274 std::size_t maxlen) 274 275 { 275 function_requires< VertexListGraphConcept<Graph> >();276 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 276 277 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 277 278 typedef std::vector<Vertex> Path; 278 function_requires< CycleVisitorConcept<Visitor,Path,Graph> >();279 BOOST_CONCEPT_ASSERT(( CycleVisitorConcept<Visitor,Path,Graph> )); 279 280 typedef std::vector<Vertex> VertexList; 280 281 typedef std::vector<VertexList> ClosedMatrix; 281 282 … … 320 321 std::size_t minlen, 321 322 std::size_t maxlen) 322 323 { 323 function_requires< VertexListGraphConcept<Graph> >();324 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 324 325 typedef typename graph_traits<Graph>::vertex_iterator VertexIterator; 325 326 326 327 VertexIterator i, end; -
boost/graph/detail/geodesic.hpp
11 11 #include <boost/config.hpp> 12 12 #include <boost/graph/graph_concepts.hpp> 13 13 #include <boost/graph/numeric_values.hpp> 14 #include <boost/concept/assert.hpp> 14 15 15 16 // TODO: Should this really be in detail? 16 17 … … 51 52 Combinator combine, 52 53 Distance init) 53 54 { 54 function_requires< VertexListGraphConcept<Graph> >();55 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 55 56 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 56 57 typedef typename graph_traits<Graph>::vertex_iterator VertexIterator; 57 function_requires< ReadablePropertyMapConcept<DistanceMap,Vertex> >();58 function_requires< NumericValueConcept<Distance> >();58 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<DistanceMap,Vertex> )); 59 BOOST_CONCEPT_ASSERT(( NumericValueConcept<Distance> )); 59 60 typedef numeric_values<Distance> DistanceNumbers; 60 function_requires< AdaptableBinaryFunction<Combinator,Distance,Distance,Distance> >();61 BOOST_CONCEPT_ASSERT(( AdaptableBinaryFunction<Combinator,Distance,Distance,Distance> )); 61 62 62 63 // If there's ever an infinite distance, then we simply return 63 64 // infinity. Note that this /will/ include the a non-zero -
boost/graph/core_numbers.hpp
15 15 #include <boost/pending/indirect_cmp.hpp> 16 16 #include <boost/graph/breadth_first_search.hpp> 17 17 #include <boost/iterator/reverse_iterator.hpp> 18 #include <boost/concept/assert.hpp> 18 19 19 20 /* 20 21 * core_numbers … … 46 47 struct CoreNumbersVisitorConcept { 47 48 void constraints() 48 49 { 49 function_requires< CopyConstructibleConcept<Visitor> >();50 BOOST_CONCEPT_ASSERT(( CopyConstructibleConcept<Visitor> )); 50 51 vis.examine_vertex(u,g); 51 52 vis.finish_vertex(u,g); 52 53 vis.examine_edge(e,g); -
boost/graph/degree_centrality.hpp
8 8 #define BOOST_GRAPH_DEGREE_CENTRALITY_HPP 9 9 10 10 #include <boost/graph/graph_concepts.hpp> 11 #include <boost/concept/assert.hpp> 11 12 12 13 namespace boost { 13 14 … … 28 29 29 30 inline degree_type operator ()(vertex_type v, const Graph& g) 30 31 { 31 function_requires< IncidenceGraphConcept<Graph> >();32 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> )); 32 33 return out_degree(v, g); 33 34 } 34 35 }; … … 49 50 50 51 inline degree_type operator ()(vertex_type v, const Graph& g) 51 52 { 52 function_requires< BidirectionalGraphConcept<Graph> >();53 BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<Graph> )); 53 54 return in_degree(v, g); 54 55 } 55 56 }; … … 64 65 inline typename Measure::degree_type 65 66 degree_centrality(const Graph& g, Vertex v, Measure measure) 66 67 { 67 function_requires< DegreeMeasureConcept<Measure, Graph> >();68 BOOST_CONCEPT_ASSERT(( DegreeMeasureConcept<Measure, Graph> )); 68 69 return measure(v, g); 69 70 } 70 71 … … 94 95 inline void 95 96 all_degree_centralities(const Graph& g, CentralityMap cent, Measure measure) 96 97 { 97 function_requires< VertexListGraphConcept<Graph> >();98 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 98 99 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 99 100 typedef typename graph_traits<Graph>::vertex_iterator VertexIterator; 100 function_requires< WritablePropertyMapConcept<CentralityMap,Vertex> >();101 BOOST_CONCEPT_ASSERT(( WritablePropertyMapConcept<CentralityMap,Vertex> )); 101 102 typedef typename property_traits<CentralityMap>::value_type Centrality; 102 103 103 104 VertexIterator i, end; -
boost/graph/kruskal_min_spanning_tree.hpp
28 28 #include <boost/graph/named_function_params.hpp> 29 29 #include <boost/pending/disjoint_sets.hpp> 30 30 #include <boost/pending/indirect_cmp.hpp> 31 #include <boost/concept/assert.hpp> 31 32 32 33 33 34 namespace boost { … … 51 52 if (num_vertices(G) == 0) return; // Nothing to do in this case 52 53 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 53 54 typedef typename graph_traits<Graph>::edge_descriptor Edge; 54 function_requires<VertexListGraphConcept<Graph> >();55 function_requires<EdgeListGraphConcept<Graph> >();56 function_requires<OutputIteratorConcept<OutputIterator, Edge> >();57 function_requires<ReadWritePropertyMapConcept<Rank, Vertex> >();58 function_requires<ReadWritePropertyMapConcept<Parent, Vertex> >();59 function_requires<ReadablePropertyMapConcept<Weight, Edge> >();55 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 56 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph> )); 57 BOOST_CONCEPT_ASSERT(( OutputIteratorConcept<OutputIterator, Edge> )); 58 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<Rank, Vertex> )); 59 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<Parent, Vertex> )); 60 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<Weight, Edge> )); 60 61 typedef typename property_traits<Weight>::value_type W_value; 61 62 typedef typename property_traits<Rank>::value_type R_value; 62 63 typedef typename property_traits<Parent>::value_type P_value; 63 function_requires<ComparableConcept<W_value> >();64 function_requires<ConvertibleConcept<P_value, Vertex> >();65 function_requires<IntegerConcept<R_value> >();64 BOOST_CONCEPT_ASSERT(( ComparableConcept<W_value> )); 65 BOOST_CONCEPT_ASSERT(( ConvertibleConcept<P_value, Vertex> )); 66 BOOST_CONCEPT_ASSERT(( IntegerConcept<R_value> )); 66 67 67 68 disjoint_sets<Rank, Parent> dset(rank, parent); 68 69 -
boost/graph/dijkstra_shortest_paths.hpp
30 30 #include <boost/property_map/property_map.hpp> 31 31 #include <boost/property_map/vector_property_map.hpp> 32 32 #include <boost/type_traits.hpp> 33 #include <boost/concept/assert.hpp> 33 34 34 35 #ifdef BOOST_GRAPH_DIJKSTRA_TESTING 35 36 # include <boost/pending/mutable_queue.hpp> … … 68 69 template <class Visitor, class Graph> 69 70 struct DijkstraVisitorConcept { 70 71 void constraints() { 71 function_requires< CopyConstructibleConcept<Visitor> >();72 BOOST_CONCEPT_ASSERT(( CopyConstructibleConcept<Visitor> )); 72 73 vis.initialize_vertex(u, g); 73 74 vis.discover_vertex(u, g); 74 75 vis.examine_vertex(u, g); -
boost/graph/floyd_warshall_shortest.hpp
34 34 #include <boost/graph/named_function_params.hpp> 35 35 #include <boost/graph/graph_concepts.hpp> 36 36 #include <boost/graph/relax.hpp> 37 #include <boost/concept/assert.hpp> 37 38 38 39 namespace boost 39 40 { … … 84 85 const BinaryFunction& combine, const Infinity& inf, 85 86 const Zero& zero) 86 87 { 87 function_requires<VertexListGraphConcept<VertexListGraph> >();88 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<VertexListGraph> )); 88 89 89 90 return detail::floyd_warshall_dispatch(g, d, compare, combine, 90 91 inf, zero); … … 101 102 const BinaryPredicate& compare, const BinaryFunction& combine, 102 103 const Infinity& inf, const Zero& zero) 103 104 { 104 function_requires<VertexListGraphConcept<VertexAndEdgeListGraph> >();105 function_requires<EdgeListGraphConcept<VertexAndEdgeListGraph> >();106 function_requires<IncidenceGraphConcept<VertexAndEdgeListGraph> >();105 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<VertexAndEdgeListGraph> )); 106 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<VertexAndEdgeListGraph> )); 107 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<VertexAndEdgeListGraph> )); 107 108 108 109 typename graph_traits<VertexAndEdgeListGraph>::vertex_iterator 109 110 firstv, lastv, firstv2, lastv2; -
boost/graph/johnson_all_pairs_shortest.hpp
29 29 #include <boost/graph/dijkstra_shortest_paths.hpp> 30 30 #include <boost/graph/adjacency_list.hpp> 31 31 #include <boost/type_traits/same_traits.hpp> 32 #include <boost/concept/assert.hpp> 32 33 33 34 namespace boost { 34 35 … … 44 45 { 45 46 typedef graph_traits<VertexAndEdgeListGraph> Traits1; 46 47 typedef typename property_traits<Weight>::value_type DT; 47 function_requires<BasicMatrixConcept<DistanceMatrix,48 typename Traits1::vertices_size_type, DT> >();48 BOOST_CONCEPT_ASSERT(( BasicMatrixConcept<DistanceMatrix, 49 typename Traits1::vertices_size_type, DT> )); 49 50 50 51 typedef typename Traits1::directed_category DirCat; 51 52 bool is_undirected = is_same<DirCat, undirected_tag>::value; -
boost/graph/connected_components.hpp
17 17 #include <boost/graph/graph_concepts.hpp> 18 18 #include <boost/graph/overloading.hpp> 19 19 #include <boost/static_assert.hpp> 20 #include <boost/concept/assert.hpp> 20 21 21 22 namespace boost { 22 23 … … 64 65 if (num_vertices(g) == 0) return 0; 65 66 66 67 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 67 function_requires< WritablePropertyMapConcept<ComponentMap, Vertex> >();68 BOOST_CONCEPT_ASSERT(( WritablePropertyMapConcept<ComponentMap, Vertex> )); 68 69 typedef typename boost::graph_traits<Graph>::directed_category directed; 69 70 BOOST_STATIC_ASSERT((boost::is_same<directed, undirected_tag>::value)); 70 71 … … 84 85 if (num_vertices(g) == 0) return 0; 85 86 86 87 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 87 function_requires< WritablePropertyMapConcept<ComponentMap, Vertex> >();88 BOOST_CONCEPT_ASSERT(( WritablePropertyMapConcept<ComponentMap, Vertex> )); 88 89 typedef typename boost::graph_traits<Graph>::directed_category directed; 89 90 // BOOST_STATIC_ASSERT((boost::is_same<directed, undirected_tag>::value)); 90 91 -
boost/graph/isomorphism.hpp
15 15 #include <boost/utility.hpp> 16 16 #include <boost/detail/algorithm.hpp> 17 17 #include <boost/pending/indirect_cmp.hpp> // for make_indirect_pmap 18 #include <boost/concept/assert.hpp> 18 19 19 20 #ifndef BOOST_GRAPH_ITERATION_MACROS_HPP 20 21 #define BOOST_ISO_INCLUDED_ITER_MACROS // local macro, see bottom of file … … 322 323 323 324 { 324 325 // Graph requirements 325 function_requires< VertexListGraphConcept<Graph1> >();326 function_requires< EdgeListGraphConcept<Graph1> >();327 function_requires< VertexListGraphConcept<Graph2> >();328 function_requires< BidirectionalGraphConcept<Graph2> >();326 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph1> )); 327 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph1> )); 328 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph2> )); 329 BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<Graph2> )); 329 330 330 331 typedef typename graph_traits<Graph1>::vertex_descriptor vertex1_t; 331 332 typedef typename graph_traits<Graph2>::vertex_descriptor vertex2_t; 332 333 typedef typename graph_traits<Graph1>::vertices_size_type size_type; 333 334 334 335 // Vertex invariant requirement 335 function_requires<AdaptableUnaryFunctionConcept<Invariant1,336 size_type, vertex1_t> >();337 function_requires<AdaptableUnaryFunctionConcept<Invariant2,338 size_type, vertex2_t> >();336 BOOST_CONCEPT_ASSERT(( AdaptableUnaryFunctionConcept<Invariant1, 337 size_type, vertex1_t> )); 338 BOOST_CONCEPT_ASSERT(( AdaptableUnaryFunctionConcept<Invariant2, 339 size_type, vertex2_t> )); 339 340 340 341 // Property map requirements 341 function_requires< ReadWritePropertyMapConcept<IsoMapping, vertex1_t> >();342 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<IsoMapping, vertex1_t> )); 342 343 typedef typename property_traits<IsoMapping>::value_type IsoMappingValue; 343 344 BOOST_STATIC_ASSERT((is_same<IsoMappingValue, vertex2_t>::value)); 344 345 345 function_requires< ReadablePropertyMapConcept<IndexMap1, vertex1_t> >();346 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<IndexMap1, vertex1_t> )); 346 347 typedef typename property_traits<IndexMap1>::value_type IndexMap1Value; 347 348 BOOST_STATIC_ASSERT((is_convertible<IndexMap1Value, size_type>::value)); 348 349 349 function_requires< ReadablePropertyMapConcept<IndexMap2, vertex2_t> >();350 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<IndexMap2, vertex2_t> )); 350 351 typedef typename property_traits<IndexMap2>::value_type IndexMap2Value; 351 352 BOOST_STATIC_ASSERT((is_convertible<IndexMap2Value, size_type>::value)); 352 353 -
boost/graph/dominator_tree.hpp
13 13 #include <deque> 14 14 #include <set> 15 15 #include <boost/graph/depth_first_search.hpp> 16 #include <boost/concept/assert.hpp> 16 17 17 18 // Dominator tree computation 18 19 … … 244 245 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 245 246 typedef typename graph_traits<Graph>::vertices_size_type VerticesSizeType; 246 247 247 function_requires< BidirectionalGraphConcept<Graph> >();248 BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<Graph> )); 248 249 249 250 const VerticesSizeType numOfVertices = num_vertices(g); 250 251 if (numOfVertices == 0) return; … … 299 300 // Typedefs and concept check 300 301 typedef typename graph_traits<Graph>::vertices_size_type VerticesSizeType; 301 302 302 function_requires< BidirectionalGraphConcept<Graph> >();303 BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<Graph> )); 303 304 304 305 // 1. Depth first visit 305 306 const VerticesSizeType numOfVertices = num_vertices(g); … … 388 389 iterator_property_map<typename std::vector< std::set<Vertex> >::iterator, 389 390 IndexMap> vertexSetMap; 390 391 391 function_requires<BidirectionalGraphConcept<Graph> >();392 BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<Graph> )); 392 393 393 394 // 1. Finding dominator 394 395 // 1.1. Initialize -
boost/graph/biconnected_components.hpp
20 20 #include <boost/property_map/property_map.hpp> 21 21 #include <boost/graph/depth_first_search.hpp> 22 22 #include <boost/graph/graph_utility.hpp> 23 #include <boost/concept/assert.hpp> 23 24 24 25 namespace boost 25 26 { … … 157 158 { 158 159 typedef typename graph_traits<Graph>::vertex_descriptor vertex_t; 159 160 typedef typename graph_traits<Graph>::edge_descriptor edge_t; 160 function_requires<VertexListGraphConcept<Graph> >();161 function_requires<IncidenceGraphConcept<Graph> >();162 function_requires<WritablePropertyMapConcept<ComponentMap, edge_t> >();163 function_requires<ReadWritePropertyMapConcept<DiscoverTimeMap,164 vertex_t> >();165 function_requires<ReadWritePropertyMapConcept<LowPointMap, vertex_t > >();166 function_requires<ReadWritePropertyMapConcept<PredecessorMap,167 vertex_t> >();161 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 162 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> )); 163 BOOST_CONCEPT_ASSERT(( WritablePropertyMapConcept<ComponentMap, edge_t> )); 164 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<DiscoverTimeMap, 165 vertex_t> )); 166 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<LowPointMap, vertex_t > )); 167 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<PredecessorMap, 168 vertex_t> )); 168 169 169 170 std::size_t num_components = 0; 170 171 std::size_t dfs_time = 0; -
boost/graph/transitive_closure.hpp
19 19 #include <boost/graph/topological_sort.hpp> 20 20 #include <boost/graph/graph_concepts.hpp> 21 21 #include <boost/graph/named_function_params.hpp> 22 #include <boost/concept/assert.hpp> 22 23 23 24 namespace boost 24 25 { … … 76 77 typedef typename graph_traits < 77 78 Graph >::adjacency_iterator adjacency_iterator; 78 79 79 function_requires < VertexListGraphConcept < Graph > >();80 function_requires < AdjacencyGraphConcept < Graph > >();81 function_requires < VertexMutableGraphConcept < GraphTC > >();82 function_requires < EdgeMutableGraphConcept < GraphTC > >();83 function_requires <ReadablePropertyMapConcept < VertexIndexMap,84 vertex > >();80 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept < Graph > )); 81 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept < Graph > )); 82 BOOST_CONCEPT_ASSERT(( VertexMutableGraphConcept < GraphTC > )); 83 BOOST_CONCEPT_ASSERT(( EdgeMutableGraphConcept < GraphTC > )); 84 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept < VertexIndexMap, 85 vertex > )); 85 86 86 87 typedef size_type cg_vertex; 87 88 std::vector < cg_vertex > component_number_vec(num_vertices(g)); … … 302 303 typedef typename graph_traits < G >::vertex_descriptor vertex; 303 304 typedef typename graph_traits < G >::vertex_iterator vertex_iterator; 304 305 305 function_requires < AdjacencyMatrixConcept < G > >();306 function_requires < EdgeMutableGraphConcept < G > >();306 BOOST_CONCEPT_ASSERT(( AdjacencyMatrixConcept < G > )); 307 BOOST_CONCEPT_ASSERT(( EdgeMutableGraphConcept < G > )); 307 308 308 309 // Matrix form: 309 310 // for k … … 328 329 typedef typename graph_traits < G >::vertex_descriptor vertex; 329 330 typedef typename graph_traits < G >::vertex_iterator vertex_iterator; 330 331 331 function_requires < AdjacencyMatrixConcept < G > >();332 function_requires < EdgeMutableGraphConcept < G > >();332 BOOST_CONCEPT_ASSERT(( AdjacencyMatrixConcept < G > )); 333 BOOST_CONCEPT_ASSERT(( EdgeMutableGraphConcept < G > )); 333 334 334 335 // Make sure second loop will work 335 336 if (num_vertices(g) == 0) -
boost/graph/eccentricity.hpp
10 10 #include <boost/utility.hpp> 11 11 #include <boost/config.hpp> 12 12 #include <boost/graph/detail/geodesic.hpp> 13 #include <boost/concept/assert.hpp> 13 14 14 15 namespace boost 15 16 { … … 19 20 inline typename property_traits<DistanceMap>::value_type 20 21 eccentricity(const Graph& g, DistanceMap dist, Combinator combine) 21 22 { 22 function_requires< GraphConcept<Graph> >();23 BOOST_CONCEPT_ASSERT(( GraphConcept<Graph> )); 23 24 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 24 function_requires< ReadablePropertyMapConcept<DistanceMap,Vertex> >();25 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<DistanceMap,Vertex> )); 25 26 typedef typename property_traits<DistanceMap>::value_type Distance; 26 27 27 28 return detail::combine_distances(g, dist, combine, Distance(0)); … … 31 32 inline typename property_traits<DistanceMap>::value_type 32 33 eccentricity(const Graph& g, DistanceMap dist) 33 34 { 34 function_requires< GraphConcept<Graph> >();35 BOOST_CONCEPT_ASSERT(( GraphConcept<Graph> )); 35 36 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 36 function_requires< ReadablePropertyMapConcept<DistanceMap,Vertex> >();37 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<DistanceMap,Vertex> )); 37 38 typedef typename property_traits<DistanceMap>::value_type Distance; 38 39 39 40 return eccentricity(g, dist, detail::maximize<Distance>()); … … 44 45 typename property_traits<EccentricityMap>::value_type> 45 46 all_eccentricities(const Graph& g, const DistanceMatrix& dist, EccentricityMap ecc) 46 47 { 47 function_requires< VertexListGraphConcept<Graph> >();48 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 48 49 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 49 50 typedef typename graph_traits<Graph>::vertex_iterator VertexIterator; 50 function_requires< ReadablePropertyMapConcept<DistanceMatrix,Vertex> >();51 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<DistanceMatrix,Vertex> )); 51 52 typedef typename property_traits<DistanceMatrix>::value_type DistanceMap; 52 function_requires< WritablePropertyMapConcept<EccentricityMap,Vertex> >();53 BOOST_CONCEPT_ASSERT(( WritablePropertyMapConcept<EccentricityMap,Vertex> )); 53 54 typedef typename property_traits<EccentricityMap>::value_type Eccentricity; 54 55 BOOST_USING_STD_MIN(); 55 56 BOOST_USING_STD_MAX(); … … 76 77 typename property_traits<EccentricityMap>::value_type> 77 78 radius_and_diameter(const Graph& g, EccentricityMap ecc) 78 79 { 79 function_requires< VertexListGraphConcept<Graph> >();80 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 80 81 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 81 82 typedef typename graph_traits<Graph>::vertex_iterator VertexIterator; 82 function_requires< ReadablePropertyMapConcept<EccentricityMap, Vertex> >();83 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<EccentricityMap, Vertex> )); 83 84 typedef typename property_traits<EccentricityMap>::value_type Eccentricity; 84 85 BOOST_USING_STD_MIN(); 85 86 BOOST_USING_STD_MAX(); -
boost/graph/closeness_centrality.hpp
9 9 10 10 #include <boost/graph/detail/geodesic.hpp> 11 11 #include <boost/graph/exterior_property.hpp> 12 #include <boost/concept/assert.hpp> 12 13 13 14 namespace boost 14 15 { … … 25 26 26 27 result_type operator ()(distance_type d, const Graph&) 27 28 { 28 function_requires< NumericValueConcept<DistanceType> >();29 function_requires< NumericValueConcept<ResultType> >();30 function_requires< AdaptableUnaryFunctionConcept<Reciprocal,ResultType,ResultType> >();29 BOOST_CONCEPT_ASSERT(( NumericValueConcept<DistanceType> )); 30 BOOST_CONCEPT_ASSERT(( NumericValueConcept<ResultType> )); 31 BOOST_CONCEPT_ASSERT(( AdaptableUnaryFunctionConcept<Reciprocal,ResultType,ResultType> )); 31 32 return (d == base_type::infinite_distance()) 32 33 ? base_type::zero_result() 33 34 : rec(result_type(d)); … … 75 76 Measure measure, 76 77 Combinator combine) 77 78 { 78 function_requires< VertexListGraphConcept<Graph> >();79 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 79 80 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 80 function_requires< ReadablePropertyMapConcept<DistanceMap,Vertex> >();81 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<DistanceMap,Vertex> )); 81 82 typedef typename property_traits<DistanceMap>::value_type Distance; 82 function_requires< NumericValueConcept<Distance> >();83 function_requires< DistanceMeasureConcept<Measure,Graph> >();83 BOOST_CONCEPT_ASSERT(( NumericValueConcept<Distance> )); 84 BOOST_CONCEPT_ASSERT(( DistanceMeasureConcept<Measure,Graph> )); 84 85 85 86 Distance n = detail::combine_distances(g, dist, combine, Distance(0)); 86 87 return measure(n, g); … … 90 91 inline typename Measure::result_type 91 92 closeness_centrality(const Graph& g, DistanceMap dist, Measure measure) 92 93 { 93 function_requires< GraphConcept<Graph> >();94 BOOST_CONCEPT_ASSERT(( GraphConcept<Graph> )); 94 95 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 95 function_requires< ReadablePropertyMapConcept<DistanceMap,Vertex> >();96 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<DistanceMap,Vertex> )); 96 97 typedef typename property_traits<DistanceMap>::value_type Distance; 97 98 98 99 return closeness_centrality(g, dist, measure, std::plus<Distance>()); … … 116 117 CentralityMap cent, 117 118 Measure measure) 118 119 { 119 function_requires< VertexListGraphConcept<Graph> >();120 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 120 121 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 121 function_requires< ReadablePropertyMapConcept<DistanceMatrixMap,Vertex> >();122 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<DistanceMatrixMap,Vertex> )); 122 123 typedef typename property_traits<DistanceMatrixMap>::value_type DistanceMap; 123 function_requires< ReadablePropertyMapConcept<DistanceMap,Vertex> >();124 function_requires< WritablePropertyMapConcept<CentralityMap,Vertex> >();124 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<DistanceMap,Vertex> )); 125 BOOST_CONCEPT_ASSERT(( WritablePropertyMapConcept<CentralityMap,Vertex> )); 125 126 typedef typename property_traits<DistanceMap>::value_type Distance; 126 127 typedef typename property_traits<CentralityMap>::value_type Centrality; 127 128 … … 141 142 DistanceMatrixMap dist, 142 143 CentralityMap cent) 143 144 { 144 function_requires< GraphConcept<Graph> >();145 BOOST_CONCEPT_ASSERT(( GraphConcept<Graph> )); 145 146 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 146 function_requires< ReadablePropertyMapConcept<DistanceMatrixMap,Vertex> >();147 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<DistanceMatrixMap,Vertex> )); 147 148 typedef typename property_traits<DistanceMatrixMap>::value_type DistanceMap; 148 function_requires< ReadablePropertyMapConcept<DistanceMap,Vertex> >();149 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<DistanceMap,Vertex> )); 149 150 typedef typename property_traits<DistanceMap>::value_type Distance; 150 151 typedef typename property_traits<CentralityMap>::value_type Result; 151 152 -
boost/graph/strong_components.hpp
18 18 #include <boost/type_traits/conversion_traits.hpp> 19 19 #include <boost/static_assert.hpp> 20 20 #include <boost/graph/overloading.hpp> 21 #include <boost/concept/assert.hpp> 21 22 22 23 namespace boost { 23 24 … … 93 94 const bgl_named_params<P, T, R>& params) 94 95 { 95 96 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 96 function_requires< ReadWritePropertyMapConcept<ComponentMap, Vertex> >();97 function_requires< ReadWritePropertyMapConcept<RootMap, Vertex> >();97 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<ComponentMap, Vertex> )); 98 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<RootMap, Vertex> )); 98 99 typedef typename property_traits<RootMap>::value_type RootV; 99 function_requires< ConvertibleConcept<RootV, Vertex> >();100 function_requires< ReadWritePropertyMapConcept<DiscoverTime, Vertex> >();100 BOOST_CONCEPT_ASSERT(( ConvertibleConcept<RootV, Vertex> )); 101 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<DiscoverTime, Vertex> )); 101 102 102 103 typename property_traits<ComponentMap>::value_type total = 0; 103 104 … … 282 283 kosaraju_strong_components(Graph& G, ComponentsMap c, 283 284 FinishTime finish_time, ColorMap color) 284 285 { 285 function_requires< MutableGraphConcept<Graph> >();286 BOOST_CONCEPT_ASSERT(( MutableGraphConcept<Graph> )); 286 287 // ... 287 288 288 289 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; -
boost/graph/graph_concepts.hpp
21 21 #include <boost/graph/buffer_concepts.hpp> 22 22 #include <boost/concept_check.hpp> 23 23 #include <boost/detail/workaround.hpp> 24 #include <boost/concept/assert.hpp> 24 25 25 26 #include <boost/concept/detail/concept_def.hpp> 26 27 namespace boost … … 529 530 { 530 531 BOOST_CONCEPT_USAGE(NumericValue) 531 532 { 532 function_requires< DefaultConstructible<Numeric> >();533 function_requires< CopyConstructible<Numeric> >();533 BOOST_CONCEPT_ASSERT(( DefaultConstructible<Numeric> )); 534 BOOST_CONCEPT_ASSERT(( CopyConstructible<Numeric> )); 534 535 numeric_values<Numeric>::zero(); 535 536 numeric_values<Numeric>::infinity(); 536 537 } -
boost/graph/depth_first_search.hpp
21 21 #include <boost/graph/named_function_params.hpp> 22 22 #include <boost/ref.hpp> 23 23 #include <boost/implicit_cast.hpp> 24 #include <boost/concept/assert.hpp> 24 25 25 26 #include <vector> 26 27 #include <utility> … … 31 32 class DFSVisitorConcept { 32 33 public: 33 34 void constraints() { 34 function_requires< CopyConstructibleConcept<Visitor> >();35 BOOST_CONCEPT_ASSERT(( CopyConstructibleConcept<Visitor> )); 35 36 vis.initialize_vertex(u, g); 36 37 vis.start_vertex(u, g); 37 38 vis.discover_vertex(u, g); … … 80 81 DFSVisitor& vis, 81 82 ColorMap color, TerminatorFunc func = TerminatorFunc()) 82 83 { 83 function_requires<IncidenceGraphConcept<IncidenceGraph> >();84 function_requires<DFSVisitorConcept<DFSVisitor, IncidenceGraph> >();84 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<IncidenceGraph> )); 85 BOOST_CONCEPT_ASSERT(( DFSVisitorConcept<DFSVisitor, IncidenceGraph> )); 85 86 typedef typename graph_traits<IncidenceGraph>::vertex_descriptor Vertex; 86 function_requires< ReadWritePropertyMapConcept<ColorMap, Vertex> >();87 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<ColorMap, Vertex> )); 87 88 typedef typename property_traits<ColorMap>::value_type ColorValue; 88 function_requires< ColorValueConcept<ColorValue> >();89 BOOST_CONCEPT_ASSERT(( ColorValueConcept<ColorValue> )); 89 90 typedef color_traits<ColorValue> Color; 90 91 typedef typename graph_traits<IncidenceGraph>::out_edge_iterator Iter; 91 92 typedef std::pair<Vertex, std::pair<Iter, Iter> > VertexInfo; … … 151 152 DFSVisitor& vis, // pass-by-reference here, important! 152 153 ColorMap color, TerminatorFunc func) 153 154 { 154 function_requires<IncidenceGraphConcept<IncidenceGraph> >();155 function_requires<DFSVisitorConcept<DFSVisitor, IncidenceGraph> >();155 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<IncidenceGraph> )); 156 BOOST_CONCEPT_ASSERT(( DFSVisitorConcept<DFSVisitor, IncidenceGraph> )); 156 157 typedef typename graph_traits<IncidenceGraph>::vertex_descriptor Vertex; 157 function_requires< ReadWritePropertyMapConcept<ColorMap, Vertex> >();158 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<ColorMap, Vertex> )); 158 159 typedef typename property_traits<ColorMap>::value_type ColorValue; 159 function_requires< ColorValueConcept<ColorValue> >();160 BOOST_CONCEPT_ASSERT(( ColorValueConcept<ColorValue> )); 160 161 typedef color_traits<ColorValue> Color; 161 162 typename graph_traits<IncidenceGraph>::out_edge_iterator ei, ei_end; 162 163 … … 187 188 typename graph_traits<VertexListGraph>::vertex_descriptor start_vertex) 188 189 { 189 190 typedef typename graph_traits<VertexListGraph>::vertex_descriptor Vertex; 190 function_requires<DFSVisitorConcept<DFSVisitor, VertexListGraph> >();191 BOOST_CONCEPT_ASSERT(( DFSVisitorConcept<DFSVisitor, VertexListGraph> )); 191 192 typedef typename property_traits<ColorMap>::value_type ColorValue; 192 193 typedef color_traits<ColorValue> Color; 193 194 -
boost/graph/distributed/concepts.hpp
21 21 #include <boost/version.hpp> 22 22 #include <boost/graph/graph_traits.hpp> 23 23 #include <boost/graph/graph_concepts.hpp> 24 #include <boost/concept/assert.hpp> 24 25 25 26 #if BOOST_VERSION >= 103500 26 27 # include <boost/concept/detail/concept_def.hpp> … … 46 47 typedef typename graph_traits<G>::traversal_category 47 48 traversal_category; 48 49 void constraints() { 49 function_requires< GraphConcept<G> >();50 function_requires< MultiPassInputIteratorConcept<vertex_iterator> >();51 function_requires<ConvertibleConcept<traversal_category,52 distributed_vertex_list_graph_tag> >();50 BOOST_CONCEPT_ASSERT(( GraphConcept<G> )); 51 BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept<vertex_iterator> )); 52 BOOST_CONCEPT_ASSERT(( ConvertibleConcept<traversal_category, 53 distributed_vertex_list_graph_tag> )); 53 54 54 55 #ifdef BOOST_VECTOR_AS_GRAPH_GRAPH_ADL_HACK 55 56 // dwa 2003/7/11 -- This clearly shouldn't be necessary, but if … … 92 93 typedef typename graph_traits<G>::traversal_category 93 94 traversal_category; 94 95 void constraints() { 95 function_requires< GraphConcept<G> >();96 function_requires< MultiPassInputIteratorConcept<edge_iterator> >();97 function_requires< DefaultConstructibleConcept<edge_descriptor> >();98 function_requires< EqualityComparableConcept<edge_descriptor> >();99 function_requires< AssignableConcept<edge_descriptor> >();100 function_requires<ConvertibleConcept<traversal_category,101 distributed_edge_list_graph_tag> >();96 BOOST_CONCEPT_ASSERT(( GraphConcept<G> )); 97 BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept<edge_iterator> )); 98 BOOST_CONCEPT_ASSERT(( DefaultConstructibleConcept<edge_descriptor> )); 99 BOOST_CONCEPT_ASSERT(( EqualityComparableConcept<edge_descriptor> )); 100 BOOST_CONCEPT_ASSERT(( AssignableConcept<edge_descriptor> )); 101 BOOST_CONCEPT_ASSERT(( ConvertibleConcept<traversal_category, 102 distributed_edge_list_graph_tag> )); 102 103 103 104 p = edges(g); 104 105 e = *p.first; -
boost/graph/distributed/hohberg_biconnected_components.hpp
44 44 #include <vector> 45 45 #include <boost/graph/parallel/algorithm.hpp> 46 46 #include <boost/graph/distributed/connected_components.hpp> 47 #include <boost/concept/assert.hpp> 47 48 48 49 namespace boost { namespace graph { namespace distributed { 49 50 … … 908 909 undirected_tag>::value)); 909 910 910 911 // The graph must model Incidence Graph 911 function_requires< IncidenceGraphConcept<Graph> >();912 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> )); 912 913 913 914 typedef typename graph_traits<Graph>::edges_size_type edges_size_type; 914 915 typedef typename graph_traits<Graph>::degree_size_type degree_size_type; -
boost/graph/geodesic_distance.hpp
9 9 10 10 #include <boost/graph/detail/geodesic.hpp> 11 11 #include <boost/graph/exterior_property.hpp> 12 #include <boost/concept/assert.hpp> 12 13 13 14 namespace boost 14 15 { … … 25 26 26 27 result_type operator ()(distance_type d, const Graph& g) 27 28 { 28 function_requires< VertexListGraphConcept<Graph> >();29 function_requires< NumericValueConcept<DistanceType> >();30 function_requires< NumericValueConcept<ResultType> >();31 function_requires< AdaptableBinaryFunctionConcept<Divides,ResultType,ResultType,ResultType> >();29 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 30 BOOST_CONCEPT_ASSERT(( NumericValueConcept<DistanceType> )); 31 BOOST_CONCEPT_ASSERT(( NumericValueConcept<ResultType> )); 32 BOOST_CONCEPT_ASSERT(( AdaptableBinaryFunctionConcept<Divides,ResultType,ResultType,ResultType> )); 32 33 33 34 return (d == base_type::infinite_distance()) 34 35 ? base_type::infinite_result() … … 69 70 70 71 inline result_type operator ()(distance_type d, const Graph& g) 71 72 { 72 function_requires< VertexListGraphConcept<Graph> >();73 function_requires< NumericValueConcept<DistanceType> >();73 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 74 BOOST_CONCEPT_ASSERT(( NumericValueConcept<DistanceType> )); 74 75 75 76 if(d == base_type::infinite_distance()) { 76 77 return base_type::infinite_result(); … … 99 100 Measure measure, 100 101 Combinator combine) 101 102 { 102 function_requires< DistanceMeasureConcept<Measure,Graph> >();103 BOOST_CONCEPT_ASSERT(( DistanceMeasureConcept<Measure,Graph> )); 103 104 typedef typename Measure::distance_type Distance; 104 105 105 106 Distance n = detail::combine_distances(g, dist, combine, Distance(0)); … … 112 113 inline typename Measure::result_type 113 114 mean_geodesic(const Graph& g, DistanceMap dist, Measure measure) 114 115 { 115 function_requires< DistanceMeasureConcept<Measure,Graph> >();116 BOOST_CONCEPT_ASSERT(( DistanceMeasureConcept<Measure,Graph> )); 116 117 typedef typename Measure::distance_type Distance; 117 118 118 119 return mean_geodesic(g, dist, measure, std::plus<Distance>()); … … 139 140 GeodesicMap geo, 140 141 Measure measure) 141 142 { 142 function_requires< VertexListGraphConcept<Graph> >();143 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 143 144 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 144 145 typedef typename graph_traits<Graph>::vertex_iterator VertexIterator; 145 function_requires< ReadablePropertyMapConcept<DistanceMatrixMap,Vertex> >();146 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<DistanceMatrixMap,Vertex> )); 146 147 typedef typename property_traits<DistanceMatrixMap>::value_type DistanceMap; 147 function_requires< DistanceMeasureConcept<Measure,Graph> >();148 BOOST_CONCEPT_ASSERT(( DistanceMeasureConcept<Measure,Graph> )); 148 149 typedef typename Measure::result_type Result; 149 function_requires< WritablePropertyMapConcept<GeodesicMap,Vertex> >();150 function_requires< NumericValueConcept<Result> >();150 BOOST_CONCEPT_ASSERT(( WritablePropertyMapConcept<GeodesicMap,Vertex> )); 151 BOOST_CONCEPT_ASSERT(( NumericValueConcept<Result> )); 151 152 152 153 // NOTE: We could compute the mean geodesic here by performing additional 153 154 // computations (i.e., adding and dividing). However, I don't really feel … … 178 179 inline typename property_traits<GeodesicMap>::value_type 179 180 all_mean_geodesics(const Graph& g, DistanceMatrixMap dist, GeodesicMap geo) 180 181 { 181 function_requires< GraphConcept<Graph> >();182 BOOST_CONCEPT_ASSERT(( GraphConcept<Graph> )); 182 183 typedef typename graph_traits<Graph>::vertex_descriptor Vertex; 183 function_requires< ReadablePropertyMapConcept<DistanceMatrixMap,Vertex> >();184 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<DistanceMatrixMap,Vertex> )); 184 185 typedef typename property_traits<DistanceMatrixMap>::value_type DistanceMap; 185 function_requires< WritablePropertyMapConcept<GeodesicMap,Vertex> >();186 BOOST_CONCEPT_ASSERT(( WritablePropertyMapConcept<GeodesicMap,Vertex> )); 186 187 typedef typename property_traits<GeodesicMap>::value_type Result; 187 188 188 189 return all_mean_geodesics(g, dist, geo, measure_mean_geodesic<Result>(g, DistanceMap())); … … 193 194 inline typename Measure::result_type 194 195 small_world_distance(const Graph& g, GeodesicMap geo, Measure measure) 195 196 { 196 function_requires< DistanceMeasureConcept<Measure,Graph> >();197 BOOST_CONCEPT_ASSERT(( DistanceMeasureConcept<Measure,Graph> )); 197 198 typedef typename Measure::result_type Result; 198 199 199 200 Result sum = detail::combine_distances(g, geo, std::plus<Result>(), Result(0)); -
boost/graph/astar_search.hpp
25 25 #include <boost/graph/detail/d_ary_heap.hpp> 26 26 #include <boost/property_map/property_map.hpp> 27 27 #include <boost/property_map/vector_property_map.hpp> 28 #include <boost/concept/assert.hpp> 28 29 29 30 30 namespace boost { 31 31 32 32 … … 34 34 struct AStarHeuristicConcept { 35 35 void constraints() 36 36 { 37 function_requires< CopyConstructibleConcept<Heuristic> >();37 BOOST_CONCEPT_ASSERT(( CopyConstructibleConcept<Heuristic> )); 38 38 h(u); 39 39 } 40 40 Heuristic h; … … 58 58 struct AStarVisitorConcept { 59 59 void constraints() 60 60 { 61 function_requires< CopyConstructibleConcept<Visitor> >();61 BOOST_CONCEPT_ASSERT(( CopyConstructibleConcept<Visitor> )); 62 62 vis.initialize_vertex(u, g); 63 63 vis.discover_vertex(u, g); 64 64 vis.examine_vertex(u, g); -
boost/graph/howard_cycle_ratio.hpp
20 20 #include <boost/property_map/property_map.hpp> 21 21 #include <boost/graph/graph_traits.hpp> 22 22 #include <boost/graph/graph_concepts.hpp> 23 #include <boost/concept/assert.hpp> 23 24 24 25 /** @file howard_cycle_ratio.hpp 25 26 * @brief The implementation of the maximum/minimum cycle ratio/mean algorithm. … … 477 478 { 478 479 typedef typename graph_traits<TG>::directed_category DirCat; 479 480 BOOST_STATIC_ASSERT((is_convertible<DirCat*, directed_tag*>::value == true)); 480 function_requires< IncidenceGraphConcept<TG> >();481 function_requires< VertexListGraphConcept<TG> >();481 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<TG> )); 482 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<TG> )); 482 483 typedef typename graph_traits<TG>::vertex_descriptor Vertex; 483 function_requires< ReadablePropertyMapConcept<TVIM, Vertex> >();484 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<TVIM, Vertex> )); 484 485 typedef typename graph_traits<TG>::edge_descriptor Edge; 485 function_requires< ReadablePropertyMapConcept<TEW1, Edge> >();486 function_requires< ReadablePropertyMapConcept<TEW2, Edge> >();486 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<TEW1, Edge> )); 487 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<TEW2, Edge> )); 487 488 488 489 if(pcc == 0) { 489 490 return detail::mcr_howard<FT,TG, TVIM, TEW1, TEW2>( -
boost/graph/breadth_first_search.hpp
24 24 #include <boost/graph/overloading.hpp> 25 25 #include <boost/graph/graph_concepts.hpp> 26 26 #include <boost/graph/two_bit_color_map.hpp> 27 #include <boost/concept/assert.hpp> 27 28 28 29 #ifdef BOOST_GRAPH_USE_MPI 29 30 #include <boost/graph/distributed/concepts.hpp> … … 34 35 template <class Visitor, class Graph> 35 36 struct BFSVisitorConcept { 36 37 void constraints() { 37 function_requires< CopyConstructibleConcept<Visitor> >();38 BOOST_CONCEPT_ASSERT(( CopyConstructibleConcept<Visitor> )); 38 39 vis.initialize_vertex(u, g); 39 40 vis.discover_vertex(u, g); 40 41 vis.examine_vertex(u, g); … … 59 60 typename graph_traits<IncidenceGraph>::vertex_descriptor s, 60 61 Buffer& Q, BFSVisitor vis, ColorMap color) 61 62 { 62 function_requires< IncidenceGraphConcept<IncidenceGraph> >();63 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<IncidenceGraph> )); 63 64 typedef graph_traits<IncidenceGraph> GTraits; 64 65 typedef typename GTraits::vertex_descriptor Vertex; 65 66 typedef typename GTraits::edge_descriptor Edge; 66 function_requires< BFSVisitorConcept<BFSVisitor, IncidenceGraph> >();67 function_requires< ReadWritePropertyMapConcept<ColorMap, Vertex> >();67 BOOST_CONCEPT_ASSERT(( BFSVisitorConcept<BFSVisitor, IncidenceGraph> )); 68 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<ColorMap, Vertex> )); 68 69 typedef typename property_traits<ColorMap>::value_type ColorValue; 69 70 typedef color_traits<ColorValue> Color; 70 71 typename GTraits::out_edge_iterator ei, ei_end; -
boost/graph/neighbor_bfs.hpp
24 24 #include <boost/graph/graph_concepts.hpp> 25 25 #include <boost/graph/visitors.hpp> 26 26 #include <boost/graph/named_function_params.hpp> 27 #include <boost/concept/assert.hpp> 27 28 28 29 namespace boost { 29 30 30 31 template <class Visitor, class Graph> 31 32 struct NeighborBFSVisitorConcept { 32 33 void constraints() { 33 function_requires< CopyConstructibleConcept<Visitor> >();34 BOOST_CONCEPT_ASSERT(( CopyConstructibleConcept<Visitor> )); 34 35 vis.initialize_vertex(u, g); 35 36 vis.discover_vertex(u, g); 36 37 vis.examine_vertex(u, g); … … 133 134 Buffer& Q, BFSVisitor vis, ColorMap color) 134 135 135 136 { 136 function_requires< BidirectionalGraphConcept<BidirectionalGraph> >();137 BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<BidirectionalGraph> )); 137 138 typedef graph_traits<BidirectionalGraph> GTraits; 138 139 typedef typename GTraits::vertex_descriptor Vertex; 139 140 typedef typename GTraits::edge_descriptor Edge; 140 function_requires<141 NeighborBFSVisitorConcept<BFSVisitor, BidirectionalGraph> >();142 function_requires< ReadWritePropertyMapConcept<ColorMap, Vertex> >();141 BOOST_CONCEPT_ASSERT(( 142 NeighborBFSVisitorConcept<BFSVisitor, BidirectionalGraph> )); 143 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<ColorMap, Vertex> )); 143 144 typedef typename property_traits<ColorMap>::value_type ColorValue; 144 145 typedef color_traits<ColorValue> Color; 145 146 -
libs/graph/test/test_construction.hpp
7 7 #ifndef TEST_CONSTRUCTION_HPP 8 8 #define TEST_CONSTRUCTION_HPP 9 9 10 #include <boost/concept/assert.hpp> 10 11 #include <utility> 11 12 12 13 /** @name Build Graph -
libs/graph/test/adj_list_cc.cpp
9 9 #include <boost/graph/graph_concepts.hpp> 10 10 #include <boost/graph/graph_archetypes.hpp> 11 11 #include <boost/graph/adjacency_list.hpp> 12 #include <boost/concept/assert.hpp> 12 13 13 14 int main(int,char*[]) 14 15 { … … 21 22 > Graph; 22 23 typedef graph_traits<Graph>::vertex_descriptor Vertex; 23 24 typedef graph_traits<Graph>::edge_descriptor Edge; 24 function_requires< VertexListGraphConcept<Graph> >();25 function_requires< EdgeListGraphConcept<Graph> >();26 function_requires< IncidenceGraphConcept<Graph> >();27 function_requires< AdjacencyGraphConcept<Graph> >();28 function_requires< MutableIncidenceGraphConcept<Graph> >();29 function_requires< MutableEdgeListGraphConcept<Graph> >();30 function_requires< VertexMutablePropertyGraphConcept<Graph> >();31 function_requires< EdgeMutablePropertyGraphConcept<Graph> >();32 function_requires<33 ReadablePropertyGraphConcept<Graph, Vertex, vertex_index_t> >();34 function_requires<35 LvaluePropertyGraphConcept<Graph, Vertex, vertex_color_t> >();36 function_requires<37 LvaluePropertyGraphConcept<Graph, Edge, edge_weight_t> >();25 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 26 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph> )); 27 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> )); 28 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> )); 29 BOOST_CONCEPT_ASSERT(( MutableIncidenceGraphConcept<Graph> )); 30 BOOST_CONCEPT_ASSERT(( MutableEdgeListGraphConcept<Graph> )); 31 BOOST_CONCEPT_ASSERT(( VertexMutablePropertyGraphConcept<Graph> )); 32 BOOST_CONCEPT_ASSERT(( EdgeMutablePropertyGraphConcept<Graph> )); 33 BOOST_CONCEPT_ASSERT(( 34 ReadablePropertyGraphConcept<Graph, Vertex, vertex_index_t> )); 35 BOOST_CONCEPT_ASSERT(( 36 LvaluePropertyGraphConcept<Graph, Vertex, vertex_color_t> )); 37 BOOST_CONCEPT_ASSERT(( 38 LvaluePropertyGraphConcept<Graph, Edge, edge_weight_t> )); 38 39 } 39 40 { 40 41 typedef adjacency_list<vecS, vecS, bidirectionalS, … … 43 44 > Graph; 44 45 typedef graph_traits<Graph>::vertex_descriptor Vertex; 45 46 typedef graph_traits<Graph>::edge_descriptor Edge; 46 function_requires< VertexListGraphConcept<Graph> >();47 function_requires< EdgeListGraphConcept<Graph> >();48 function_requires< IncidenceGraphConcept<Graph> >();49 function_requires< AdjacencyGraphConcept<Graph> >();50 function_requires< BidirectionalGraphConcept<Graph> >();51 function_requires< MutableBidirectionalGraphConcept<Graph> >();52 function_requires< MutableEdgeListGraphConcept<Graph> >();53 function_requires< VertexMutablePropertyGraphConcept<Graph> >();54 function_requires< EdgeMutablePropertyGraphConcept<Graph> >();55 function_requires<56 ReadablePropertyGraphConcept<Graph, Vertex, vertex_index_t> >();57 function_requires<58 LvaluePropertyGraphConcept<Graph, Vertex, vertex_color_t> >();59 function_requires<60 LvaluePropertyGraphConcept<Graph, Edge, edge_weight_t> >();47 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 48 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph> )); 49 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> )); 50 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> )); 51 BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<Graph> )); 52 BOOST_CONCEPT_ASSERT(( MutableBidirectionalGraphConcept<Graph> )); 53 BOOST_CONCEPT_ASSERT(( MutableEdgeListGraphConcept<Graph> )); 54 BOOST_CONCEPT_ASSERT(( VertexMutablePropertyGraphConcept<Graph> )); 55 BOOST_CONCEPT_ASSERT(( EdgeMutablePropertyGraphConcept<Graph> )); 56 BOOST_CONCEPT_ASSERT(( 57 ReadablePropertyGraphConcept<Graph, Vertex, vertex_index_t> )); 58 BOOST_CONCEPT_ASSERT(( 59 LvaluePropertyGraphConcept<Graph, Vertex, vertex_color_t> )); 60 BOOST_CONCEPT_ASSERT(( 61 LvaluePropertyGraphConcept<Graph, Edge, edge_weight_t> )); 61 62 } 62 63 { 63 64 typedef adjacency_list< listS, listS, directedS, … … 66 67 > Graph; 67 68 typedef graph_traits<Graph>::vertex_descriptor Vertex; 68 69 typedef graph_traits<Graph>::edge_descriptor Edge; 69 function_requires< VertexListGraphConcept<Graph> >();70 function_requires< EdgeListGraphConcept<Graph> >();71 function_requires< IncidenceGraphConcept<Graph> >();72 function_requires< AdjacencyGraphConcept<Graph> >();73 function_requires< MutableIncidenceGraphConcept<Graph> >();74 function_requires< MutableEdgeListGraphConcept<Graph> >();75 function_requires< VertexMutablePropertyGraphConcept<Graph> >();76 function_requires< EdgeMutablePropertyGraphConcept<Graph> >();77 function_requires<78 ReadablePropertyGraphConcept<Graph, Vertex, vertex_index_t> >();79 function_requires<80 LvaluePropertyGraphConcept<Graph, Vertex, vertex_color_t> >();81 function_requires<82 LvaluePropertyGraphConcept<Graph, Edge, edge_weight_t> >();70 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 71 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph> )); 72 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> )); 73 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> )); 74 BOOST_CONCEPT_ASSERT(( MutableIncidenceGraphConcept<Graph> )); 75 BOOST_CONCEPT_ASSERT(( MutableEdgeListGraphConcept<Graph> )); 76 BOOST_CONCEPT_ASSERT(( VertexMutablePropertyGraphConcept<Graph> )); 77 BOOST_CONCEPT_ASSERT(( EdgeMutablePropertyGraphConcept<Graph> )); 78 BOOST_CONCEPT_ASSERT(( 79 ReadablePropertyGraphConcept<Graph, Vertex, vertex_index_t> )); 80 BOOST_CONCEPT_ASSERT(( 81 LvaluePropertyGraphConcept<Graph, Vertex, vertex_color_t> )); 82 BOOST_CONCEPT_ASSERT(( 83 LvaluePropertyGraphConcept<Graph, Edge, edge_weight_t> )); 83 84 } 84 85 { 85 86 typedef adjacency_list< listS, listS, undirectedS, … … 88 89 > Graph; 89 90 typedef graph_traits<Graph>::vertex_descriptor Vertex; 90 91 typedef graph_traits<Graph>::edge_descriptor Edge; 91 function_requires< VertexListGraphConcept<Graph> >();92 function_requires< EdgeListGraphConcept<Graph> >();93 function_requires< IncidenceGraphConcept<Graph> >();94 function_requires< AdjacencyGraphConcept<Graph> >();95 function_requires< MutableBidirectionalGraphConcept<Graph> >();96 function_requires< MutableEdgeListGraphConcept<Graph> >();97 function_requires< VertexMutablePropertyGraphConcept<Graph> >();98 function_requires< EdgeMutablePropertyGraphConcept<Graph> >();99 function_requires<100 ReadablePropertyGraphConcept<Graph, Vertex, vertex_index_t> >();101 function_requires<102 LvaluePropertyGraphConcept<Graph, Vertex, vertex_color_t> >();103 function_requires<104 LvaluePropertyGraphConcept<Graph, Edge, edge_weight_t> >();92 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 93 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph> )); 94 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> )); 95 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> )); 96 BOOST_CONCEPT_ASSERT(( MutableBidirectionalGraphConcept<Graph> )); 97 BOOST_CONCEPT_ASSERT(( MutableEdgeListGraphConcept<Graph> )); 98 BOOST_CONCEPT_ASSERT(( VertexMutablePropertyGraphConcept<Graph> )); 99 BOOST_CONCEPT_ASSERT(( EdgeMutablePropertyGraphConcept<Graph> )); 100 BOOST_CONCEPT_ASSERT(( 101 ReadablePropertyGraphConcept<Graph, Vertex, vertex_index_t> )); 102 BOOST_CONCEPT_ASSERT(( 103 LvaluePropertyGraphConcept<Graph, Vertex, vertex_color_t> )); 104 BOOST_CONCEPT_ASSERT(( 105 LvaluePropertyGraphConcept<Graph, Edge, edge_weight_t> )); 105 106 } 106 107 // Checking adjacency_list with EdgeList=setS 107 108 { … … 111 112 > Graph; 112 113 typedef graph_traits<Graph>::vertex_descriptor Vertex; 113 114 typedef graph_traits<Graph>::edge_descriptor Edge; 114 function_requires< VertexListGraphConcept<Graph> >();115 function_requires< EdgeListGraphConcept<Graph> >();116 function_requires< IncidenceGraphConcept<Graph> >();117 function_requires< AdjacencyGraphConcept<Graph> >();118 function_requires< BidirectionalGraphConcept<Graph> >();119 function_requires< MutableBidirectionalGraphConcept<Graph> >();120 function_requires< MutableEdgeListGraphConcept<Graph> >();121 function_requires< VertexMutablePropertyGraphConcept<Graph> >();122 function_requires< EdgeMutablePropertyGraphConcept<Graph> >();123 function_requires<124 ReadablePropertyGraphConcept<Graph, Vertex, vertex_index_t> >();125 function_requires<126 LvaluePropertyGraphConcept<Graph, Vertex, vertex_color_t> >();127 function_requires<128 LvaluePropertyGraphConcept<Graph, Edge, edge_weight_t> >();115 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 116 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph> )); 117 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> )); 118 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> )); 119 BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<Graph> )); 120 BOOST_CONCEPT_ASSERT(( MutableBidirectionalGraphConcept<Graph> )); 121 BOOST_CONCEPT_ASSERT(( MutableEdgeListGraphConcept<Graph> )); 122 BOOST_CONCEPT_ASSERT(( VertexMutablePropertyGraphConcept<Graph> )); 123 BOOST_CONCEPT_ASSERT(( EdgeMutablePropertyGraphConcept<Graph> )); 124 BOOST_CONCEPT_ASSERT(( 125 ReadablePropertyGraphConcept<Graph, Vertex, vertex_index_t> )); 126 BOOST_CONCEPT_ASSERT(( 127 LvaluePropertyGraphConcept<Graph, Vertex, vertex_color_t> )); 128 BOOST_CONCEPT_ASSERT(( 129 LvaluePropertyGraphConcept<Graph, Edge, edge_weight_t> )); 129 130 } 130 131 { 131 132 typedef adjacency_list< setS, listS, directedS, … … 134 135 > Graph; 135 136 typedef graph_traits<Graph>::vertex_descriptor Vertex; 136 137 typedef graph_traits<Graph>::edge_descriptor Edge; 137 function_requires< VertexListGraphConcept<Graph> >();138 function_requires< EdgeListGraphConcept<Graph> >();139 function_requires< IncidenceGraphConcept<Graph> >();140 function_requires< AdjacencyGraphConcept<Graph> >();141 function_requires< MutableIncidenceGraphConcept<Graph> >();142 function_requires< MutableEdgeListGraphConcept<Graph> >();143 function_requires< VertexMutablePropertyGraphConcept<Graph> >();144 function_requires< EdgeMutablePropertyGraphConcept<Graph> >();145 function_requires<146 ReadablePropertyGraphConcept<Graph, Vertex, vertex_index_t> >();147 function_requires<148 LvaluePropertyGraphConcept<Graph, Vertex, vertex_color_t> >();149 function_requires<150 LvaluePropertyGraphConcept<Graph, Edge, edge_weight_t> >();138 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 139 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph> )); 140 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> )); 141 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> )); 142 BOOST_CONCEPT_ASSERT(( MutableIncidenceGraphConcept<Graph> )); 143 BOOST_CONCEPT_ASSERT(( MutableEdgeListGraphConcept<Graph> )); 144 BOOST_CONCEPT_ASSERT(( VertexMutablePropertyGraphConcept<Graph> )); 145 BOOST_CONCEPT_ASSERT(( EdgeMutablePropertyGraphConcept<Graph> )); 146 BOOST_CONCEPT_ASSERT(( 147 ReadablePropertyGraphConcept<Graph, Vertex, vertex_index_t> )); 148 BOOST_CONCEPT_ASSERT(( 149 LvaluePropertyGraphConcept<Graph, Vertex, vertex_color_t> )); 150 BOOST_CONCEPT_ASSERT(( 151 LvaluePropertyGraphConcept<Graph, Edge, edge_weight_t> )); 151 152 } 152 153 { 153 154 typedef adjacency_list< setS, listS, undirectedS, … … 156 157 > Graph; 157 158 typedef graph_traits<Graph>::vertex_descriptor Vertex; 158 159 typedef graph_traits<Graph>::edge_descriptor Edge; 159 function_requires< VertexListGraphConcept<Graph> >();160 function_requires< EdgeListGraphConcept<Graph> >();161 function_requires< IncidenceGraphConcept<Graph> >();162 function_requires< AdjacencyGraphConcept<Graph> >();163 function_requires< MutableBidirectionalGraphConcept<Graph> >();164 function_requires< MutableEdgeListGraphConcept<Graph> >();165 function_requires< VertexMutablePropertyGraphConcept<Graph> >();166 function_requires< EdgeMutablePropertyGraphConcept<Graph> >();167 function_requires<168 ReadablePropertyGraphConcept<Graph, Vertex, vertex_index_t> >();169 function_requires<170 LvaluePropertyGraphConcept<Graph, Vertex, vertex_color_t> >();171 function_requires<172 LvaluePropertyGraphConcept<Graph, Edge, edge_weight_t> >();160 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 161 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph> )); 162 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> )); 163 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> )); 164 BOOST_CONCEPT_ASSERT(( MutableBidirectionalGraphConcept<Graph> )); 165 BOOST_CONCEPT_ASSERT(( MutableEdgeListGraphConcept<Graph> )); 166 BOOST_CONCEPT_ASSERT(( VertexMutablePropertyGraphConcept<Graph> )); 167 BOOST_CONCEPT_ASSERT(( EdgeMutablePropertyGraphConcept<Graph> )); 168 BOOST_CONCEPT_ASSERT(( 169 ReadablePropertyGraphConcept<Graph, Vertex, vertex_index_t> )); 170 BOOST_CONCEPT_ASSERT(( 171 LvaluePropertyGraphConcept<Graph, Vertex, vertex_color_t> )); 172 BOOST_CONCEPT_ASSERT(( 173 LvaluePropertyGraphConcept<Graph, Edge, edge_weight_t> )); 173 174 } 174 175 // Check adjacency_list without any properties 175 176 { 176 177 typedef adjacency_list<vecS, vecS, directedS > Graph; 177 178 typedef graph_traits<Graph>::vertex_descriptor Vertex; 178 179 typedef graph_traits<Graph>::edge_descriptor Edge; 179 function_requires< VertexListGraphConcept<Graph> >();180 function_requires< EdgeListGraphConcept<Graph> >();181 function_requires< IncidenceGraphConcept<Graph> >();182 function_requires< AdjacencyGraphConcept<Graph> >();183 function_requires< MutableIncidenceGraphConcept<Graph> >();184 function_requires< MutableEdgeListGraphConcept<Graph> >();185 function_requires< VertexMutablePropertyGraphConcept<Graph> >();186 function_requires< EdgeMutablePropertyGraphConcept<Graph> >();187 function_requires<188 ReadablePropertyGraphConcept<Graph, Vertex, vertex_index_t> >();180 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 181 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph> )); 182 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> )); 183 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> )); 184 BOOST_CONCEPT_ASSERT(( MutableIncidenceGraphConcept<Graph> )); 185 BOOST_CONCEPT_ASSERT(( MutableEdgeListGraphConcept<Graph> )); 186 BOOST_CONCEPT_ASSERT(( VertexMutablePropertyGraphConcept<Graph> )); 187 BOOST_CONCEPT_ASSERT(( EdgeMutablePropertyGraphConcept<Graph> )); 188 BOOST_CONCEPT_ASSERT(( 189 ReadablePropertyGraphConcept<Graph, Vertex, vertex_index_t> )); 189 190 } 190 191 { 191 192 typedef adjacency_list<vecS, vecS, bidirectionalS> Graph; 192 193 typedef graph_traits<Graph>::vertex_descriptor Vertex; 193 194 typedef graph_traits<Graph>::edge_descriptor Edge; 194 function_requires< VertexListGraphConcept<Graph> >();195 function_requires< EdgeListGraphConcept<Graph> >();196 function_requires< IncidenceGraphConcept<Graph> >();197 function_requires< AdjacencyGraphConcept<Graph> >();198 function_requires< BidirectionalGraphConcept<Graph> >();199 function_requires< MutableBidirectionalGraphConcept<Graph> >();200 function_requires< MutableEdgeListGraphConcept<Graph> >();201 function_requires<202 ReadablePropertyGraphConcept<Graph, Vertex, vertex_index_t> >();195 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 196 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph> )); 197 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> )); 198 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> )); 199 BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<Graph> )); 200 BOOST_CONCEPT_ASSERT(( MutableBidirectionalGraphConcept<Graph> )); 201 BOOST_CONCEPT_ASSERT(( MutableEdgeListGraphConcept<Graph> )); 202 BOOST_CONCEPT_ASSERT(( 203 ReadablePropertyGraphConcept<Graph, Vertex, vertex_index_t> )); 203 204 } 204 205 { 205 206 typedef adjacency_list< listS, listS, directedS> Graph; 206 207 typedef graph_traits<Graph>::vertex_descriptor Vertex; 207 208 typedef graph_traits<Graph>::edge_descriptor Edge; 208 function_requires< VertexListGraphConcept<Graph> >();209 function_requires< EdgeListGraphConcept<Graph> >();210 function_requires< IncidenceGraphConcept<Graph> >();211 function_requires< AdjacencyGraphConcept<Graph> >();212 function_requires< MutableIncidenceGraphConcept<Graph> >();213 function_requires< MutableEdgeListGraphConcept<Graph> >();209 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 210 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph> )); 211 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> )); 212 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> )); 213 BOOST_CONCEPT_ASSERT(( MutableIncidenceGraphConcept<Graph> )); 214 BOOST_CONCEPT_ASSERT(( MutableEdgeListGraphConcept<Graph> )); 214 215 } 215 216 { 216 217 typedef adjacency_list< listS, listS, undirectedS> Graph; 217 218 typedef graph_traits<Graph>::vertex_descriptor Vertex; 218 219 typedef graph_traits<Graph>::edge_descriptor Edge; 219 function_requires< VertexListGraphConcept<Graph> >();220 function_requires< EdgeListGraphConcept<Graph> >();221 function_requires< IncidenceGraphConcept<Graph> >();222 function_requires< AdjacencyGraphConcept<Graph> >();223 function_requires< MutableBidirectionalGraphConcept<Graph> >();224 function_requires< MutableEdgeListGraphConcept<Graph> >();220 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 221 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph> )); 222 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> )); 223 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> )); 224 BOOST_CONCEPT_ASSERT(( MutableBidirectionalGraphConcept<Graph> )); 225 BOOST_CONCEPT_ASSERT(( MutableEdgeListGraphConcept<Graph> )); 225 226 } 226 227 // Checking EdgeList=setS with no properties 227 228 { 228 229 typedef adjacency_list<setS, vecS, bidirectionalS> Graph; 229 230 typedef graph_traits<Graph>::vertex_descriptor Vertex; 230 231 typedef graph_traits<Graph>::edge_descriptor Edge; 231 function_requires< VertexListGraphConcept<Graph> >();232 function_requires< EdgeListGraphConcept<Graph> >();233 function_requires< IncidenceGraphConcept<Graph> >();234 function_requires< AdjacencyGraphConcept<Graph> >();235 function_requires< BidirectionalGraphConcept<Graph> >();236 function_requires< MutableBidirectionalGraphConcept<Graph> >();237 function_requires< MutableEdgeListGraphConcept<Graph> >();238 function_requires<ReadablePropertyGraphConcept<Graph,239 Vertex, vertex_index_t> >();232 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 233 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph> )); 234 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> )); 235 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> )); 236 BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<Graph> )); 237 BOOST_CONCEPT_ASSERT(( MutableBidirectionalGraphConcept<Graph> )); 238 BOOST_CONCEPT_ASSERT(( MutableEdgeListGraphConcept<Graph> )); 239 BOOST_CONCEPT_ASSERT(( ReadablePropertyGraphConcept<Graph, 240 Vertex, vertex_index_t> )); 240 241 } 241 242 { 242 243 typedef adjacency_list< setS, listS, directedS> Graph; 243 244 typedef graph_traits<Graph>::vertex_descriptor Vertex; 244 245 typedef graph_traits<Graph>::edge_descriptor Edge; 245 function_requires< MutableIncidenceGraphConcept<Graph> >();246 function_requires< MutableEdgeListGraphConcept<Graph> >();246 BOOST_CONCEPT_ASSERT(( MutableIncidenceGraphConcept<Graph> )); 247 BOOST_CONCEPT_ASSERT(( MutableEdgeListGraphConcept<Graph> )); 247 248 } 248 249 { 249 250 typedef adjacency_list< setS, listS, undirectedS> Graph; 250 251 typedef graph_traits<Graph>::vertex_descriptor Vertex; 251 252 typedef graph_traits<Graph>::edge_descriptor Edge; 252 function_requires< VertexListGraphConcept<Graph> >();253 function_requires< EdgeListGraphConcept<Graph> >();254 function_requires< IncidenceGraphConcept<Graph> >();255 function_requires< AdjacencyGraphConcept<Graph> >();256 function_requires< MutableBidirectionalGraphConcept<Graph> >();257 function_requires< MutableEdgeListGraphConcept<Graph> >();253 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 254 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph> )); 255 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> )); 256 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> )); 257 BOOST_CONCEPT_ASSERT(( MutableBidirectionalGraphConcept<Graph> )); 258 BOOST_CONCEPT_ASSERT(( MutableEdgeListGraphConcept<Graph> )); 258 259 } 259 260 return 0; 260 261 } -
libs/graph/test/graph_concepts.cpp
8 8 //======================================================================= 9 9 #include <boost/graph/graph_concepts.hpp> 10 10 #include <boost/graph/graph_archetypes.hpp> 11 #include <boost/concept/assert.hpp> 11 12 12 13 int main(int,char*[]) 13 14 { … … 19 20 20 21 typedef incidence_graph_archetype<Vertex, directed_tag, 21 22 allow_parallel_edge_tag> Graph1; 22 function_requires< IncidenceGraphConcept<Graph1> >();23 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph1> )); 23 24 24 25 typedef adjacency_graph_archetype<Vertex, directed_tag, 25 26 allow_parallel_edge_tag> Graph2; 26 function_requires< AdjacencyGraphConcept<Graph2> >();27 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph2> )); 27 28 28 29 typedef vertex_list_graph_archetype<Vertex, directed_tag, 29 30 allow_parallel_edge_tag> Graph3; 30 function_requires< VertexListGraphConcept<Graph3> >();31 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph3> )); 31 32 32 function_requires< ColorValueConcept<color_value_archetype> >();33 BOOST_CONCEPT_ASSERT(( ColorValueConcept<color_value_archetype> )); 33 34 34 35 typedef incidence_graph_archetype<Vertex, directed_tag, allow_parallel_edge_tag> G; 35 36 typedef property_graph_archetype<G, vertex_color_t, color_value_archetype> 36 37 Graph4; 37 function_requires< PropertyGraphConcept<Graph4, Vertex, vertex_color_t> >();38 BOOST_CONCEPT_ASSERT(( PropertyGraphConcept<Graph4, Vertex, vertex_color_t> )); 38 39 39 40 return 0; 40 41 } -
libs/graph/test/grid_graph_cc.cpp
10 10 #include <boost/graph/graph_archetypes.hpp> 11 11 #include <boost/graph/graph_concepts.hpp> 12 12 #include <boost/graph/grid_graph.hpp> 13 #include <boost/concept/assert.hpp> 13 14 14 15 #define DIMENSIONS 3 15 16 using namespace boost; … … 20 21 typedef graph_traits<Graph>::vertex_descriptor Vertex; 21 22 typedef graph_traits<Graph>::edge_descriptor Edge; 22 23 23 function_requires<BidirectionalGraphConcept<Graph> >();24 function_requires<VertexListGraphConcept<Graph> >();25 function_requires<EdgeListGraphConcept<Graph> >();26 function_requires<IncidenceGraphConcept<Graph> >();27 function_requires<AdjacencyGraphConcept<Graph> >();28 function_requires<AdjacencyMatrixConcept<Graph> >();29 function_requires<ReadablePropertyGraphConcept<Graph, Vertex, vertex_index_t> >();30 function_requires<ReadablePropertyGraphConcept<Graph, Edge, edge_index_t> >();24 BOOST_CONCEPT_ASSERT((BidirectionalGraphConcept<Graph> )); 25 BOOST_CONCEPT_ASSERT((VertexListGraphConcept<Graph> )); 26 BOOST_CONCEPT_ASSERT((EdgeListGraphConcept<Graph> )); 27 BOOST_CONCEPT_ASSERT((IncidenceGraphConcept<Graph> )); 28 BOOST_CONCEPT_ASSERT((AdjacencyGraphConcept<Graph> )); 29 BOOST_CONCEPT_ASSERT((AdjacencyMatrixConcept<Graph> )); 30 BOOST_CONCEPT_ASSERT((ReadablePropertyGraphConcept<Graph, Vertex, vertex_index_t> )); 31 BOOST_CONCEPT_ASSERT((ReadablePropertyGraphConcept<Graph, Edge, edge_index_t> )); 31 32 32 33 return (0); 33 34 } -
libs/graph/test/filtered_graph_cc.cpp
10 10 #include <boost/graph/graph_archetypes.hpp> 11 11 #include <boost/graph/adjacency_list.hpp> 12 12 #include <boost/graph/filtered_graph.hpp> 13 #include <boost/concept/assert.hpp> 13 14 14 15 int main(int,char*[]) 15 16 { … … 22 23 typedef filtered_graph<Graph, is_residual_edge<ResCapMap> > ResGraph; 23 24 typedef graph_traits<ResGraph>::edge_descriptor Edge; 24 25 25 function_requires< VertexListGraphConcept<ResGraph> >();26 function_requires< EdgeListGraphConcept<ResGraph> >();27 function_requires< IncidenceGraphConcept<ResGraph> >();28 function_requires< AdjacencyGraphConcept<ResGraph> >();29 function_requires<PropertyGraphConcept<ResGraph, Edge,30 edge_residual_capacity_t> >();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> )); 31 32 } 32 33 // Check filtered_graph with bidirectional adjacency_list 33 34 { … … 35 36 no_property, property<edge_residual_capacity_t, long> > Graph; 36 37 typedef property_map<Graph, edge_residual_capacity_t>::type ResCapMap; 37 38 typedef filtered_graph<Graph, is_residual_edge<ResCapMap> > ResGraph; 38 function_requires< BidirectionalGraphConcept<ResGraph> >();39 BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<ResGraph> )); 39 40 } 40 41 return 0; 41 42 } -
libs/graph/test/vector_graph_cc.cpp
7 7 // http://www.boost.org/LICENSE_1_0.txt) 8 8 //======================================================================= 9 9 #include <boost/config.hpp> 10 #include <boost/concept/assert.hpp> 10 11 #include <vector> 11 12 #include <list> 12 13 … … 24 25 // Check "vector as graph" 25 26 { 26 27 typedef std::vector< std::list<int> > Graph; 27 function_requires< VertexListGraphConcept<Graph> >();28 function_requires< IncidenceGraphConcept<Graph> >();29 function_requires< AdjacencyGraphConcept<Graph> >();28 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 29 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> )); 30 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> )); 30 31 } 31 32 return 0; 32 33 } -
libs/graph/test/test_properties.hpp
7 7 #ifndef TEST_PROPERTIES_HPP 8 8 #define TEST_PROPERTIES_HPP 9 9 10 #include <boost/concept/assert.hpp> 11 10 12 template<typename T> T const& as_const(T& x) { return x; } 11 13 template<typename T> void ignore(T const&) { } 12 14 -
libs/graph/test/test_destruction.hpp
7 7 #ifndef TEST_DESTRUCTION_HPP 8 8 #define TEST_DESTRUCTION_HPP 9 9 10 #include <boost/concept/assert.hpp> 10 11 #include <utility> 11 12 12 13 /** @name Destroy Graph … … 36 37 void destroy_graph(Graph& g, VertexSet const&, boost::mpl::false_, boost::mpl::true_) { 37 38 using namespace boost; 38 39 BOOST_CONCEPT_ASSERT((VertexListGraphConcept<Graph>)); 39 // function_requires< VeretexMutableGraphConcept<Graph> >();40 // BOOST_CONCEPT_ASSERT(( VeretexMutableGraphConcept<Graph> )); 40 41 41 42 std::cout << "...destroy_labeled\n"; 42 43 // Remove the roof vertex -
libs/graph/test/test_direction.hpp
9 9 10 10 #include <algorithm> 11 11 #include <boost/range.hpp> 12 #include <boost/concept/assert.hpp> 12 13 13 14 /** @name Test Out-Directed Graph 14 15 * Test all graphs that have directed out edges. -
libs/graph/test/reverse_graph_cc.cpp
10 10 #include <boost/graph/graph_archetypes.hpp> 11 11 #include <boost/graph/adjacency_list.hpp> 12 12 #include <boost/graph/reverse_graph.hpp> 13 #include <boost/concept/assert.hpp> 13 14 #include <string> 14 15 15 16 int main(int,char*[]) … … 23 24 property<graph_name_t, std::string> 24 25 > AdjList; 25 26 typedef reverse_graph<AdjList> Graph; 26 function_requires< VertexListGraphConcept<Graph> >();27 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 27 28 typedef graph_traits<Graph>::vertex_descriptor Vertex; 28 29 typedef graph_traits<Graph>::edge_descriptor Edge; 29 function_requires< ReadablePropertyGraphConcept<Graph, Vertex, vertex_color_t> >();30 function_requires< ReadablePropertyGraphConcept<Graph, Edge, edge_weight_t> >();30 BOOST_CONCEPT_ASSERT(( ReadablePropertyGraphConcept<Graph, Vertex, vertex_color_t> )); 31 BOOST_CONCEPT_ASSERT(( ReadablePropertyGraphConcept<Graph, Edge, edge_weight_t> )); 31 32 AdjList g; 32 33 Graph gr(g); 33 34 get_property(gr, graph_name_t()); … … 40 41 property<graph_name_t, std::string> 41 42 > AdjList; 42 43 typedef reverse_graph<AdjList,AdjList&> Graph; 43 function_requires< VertexListGraphConcept<Graph> >();44 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 44 45 typedef graph_traits<Graph>::vertex_descriptor Vertex; 45 46 typedef graph_traits<Graph>::edge_descriptor Edge; 46 function_requires< PropertyGraphConcept<Graph, Vertex, vertex_color_t> >();47 function_requires< PropertyGraphConcept<Graph, Edge, edge_weight_t> >();47 BOOST_CONCEPT_ASSERT(( PropertyGraphConcept<Graph, Vertex, vertex_color_t> )); 48 BOOST_CONCEPT_ASSERT(( PropertyGraphConcept<Graph, Edge, edge_weight_t> )); 48 49 AdjList g; 49 50 Graph gr(g); 50 51 get_property(gr, graph_name_t()); -
libs/graph/test/test_iteration.hpp
7 7 #ifndef TEST_ITERATION_HPP 8 8 #define TEST_ITERATION_HPP 9 9 10 #include <boost/concept/assert.hpp> 10 11 #include <algorithm> 11 12 12 13 /** @name Test Vertex List -
libs/graph/test/read_propmap.cpp
6 6 7 7 #include <boost/graph/graph_concepts.hpp> 8 8 #include <boost/graph/adjacency_list.hpp> 9 #include <boost/concept/assert.hpp> 9 10 10 11 // Test contributed by Dmitry that validates a read-only property map bug 11 12 // for bundled properties. … … 24 25 typedef property_map<graph_t, double EdgeProp::*>::type WeightMap; 25 26 typedef property_map<graph_t, double EdgeProp::*>::const_type cWeightMap; 26 27 typedef graph_traits<graph_t>::edge_descriptor Edge; 27 function_requires<ReadablePropertyMapConcept<WeightMap, Edge> >();28 function_requires<ReadablePropertyMapConcept<cWeightMap, Edge> >();28 BOOST_CONCEPT_ASSERT((ReadablePropertyMapConcept<WeightMap, Edge> )); 29 BOOST_CONCEPT_ASSERT((ReadablePropertyMapConcept<cWeightMap, Edge> )); 29 30 return 0; 30 31 } -
libs/graph/test/adj_matrix_cc.cpp
9 9 #include <boost/graph/graph_concepts.hpp> 10 10 #include <boost/graph/graph_archetypes.hpp> 11 11 #include <boost/graph/adjacency_matrix.hpp> 12 #include <boost/concept/assert.hpp> 12 13 13 14 int main(int,char*[]) 14 15 { … … 16 17 // Check adjacency_matrix without properties 17 18 { 18 19 typedef adjacency_matrix<directedS> Graph; 19 function_requires< VertexListGraphConcept<Graph> >();20 function_requires< EdgeListGraphConcept<Graph> >();21 function_requires< IncidenceGraphConcept<Graph> >();22 function_requires< AdjacencyGraphConcept<Graph> >();23 function_requires< MutableGraphConcept<Graph> >();24 function_requires< AdjacencyMatrixConcept<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> )); 25 26 } 26 27 { 27 28 typedef adjacency_matrix<undirectedS> Graph; 28 function_requires< VertexListGraphConcept<Graph> >();29 function_requires< EdgeListGraphConcept<Graph> >();30 function_requires< IncidenceGraphConcept<Graph> >();31 function_requires< AdjacencyGraphConcept<Graph> >();32 function_requires< MutableGraphConcept<Graph> >();33 function_requires< AdjacencyMatrixConcept<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> )); 34 35 } 35 36 // Check adjacency_matrix with properties 36 37 { … … 39 40 property<edge_weight_t, float> > Graph; 40 41 typedef graph_traits<Graph>::vertex_descriptor Vertex; 41 42 typedef graph_traits<Graph>::edge_descriptor Edge; 42 function_requires< VertexListGraphConcept<Graph> >();43 function_requires< EdgeListGraphConcept<Graph> >();44 function_requires< IncidenceGraphConcept<Graph> >();45 function_requires< AdjacencyGraphConcept<Graph> >();46 function_requires< AdjacencyMatrixConcept<Graph> >();47 function_requires< VertexMutablePropertyGraphConcept<Graph> >();48 function_requires< EdgeMutablePropertyGraphConcept<Graph> >();49 function_requires<ReadablePropertyGraphConcept<Graph,50 Vertex, vertex_index_t> >();51 function_requires< PropertyGraphConcept<Graph, Vertex, vertex_color_t> >();52 function_requires< PropertyGraphConcept<Graph, Edge, edge_weight_t> >();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> )); 53 54 } 54 55 { 55 56 typedef adjacency_matrix<undirectedS, … … 57 58 property<edge_weight_t, float> > Graph; 58 59 typedef graph_traits<Graph>::vertex_descriptor Vertex; 59 60 typedef graph_traits<Graph>::edge_descriptor Edge; 60 function_requires< VertexListGraphConcept<Graph> >();61 function_requires< EdgeListGraphConcept<Graph> >();62 function_requires< IncidenceGraphConcept<Graph> >();63 function_requires< AdjacencyGraphConcept<Graph> >();64 function_requires< AdjacencyMatrixConcept<Graph> >();65 function_requires< VertexMutablePropertyGraphConcept<Graph> >();66 function_requires< EdgeMutablePropertyGraphConcept<Graph> >();67 function_requires<ReadablePropertyGraphConcept<Graph,68 Vertex, vertex_index_t> >();69 function_requires< PropertyGraphConcept<Graph, Vertex, vertex_color_t> >();70 function_requires< PropertyGraphConcept<Graph, Edge, edge_weight_t> >();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> )); 71 72 } 72 73 return 0; 73 74 } -
libs/graph/test/edge_list_cc.cpp
9 9 #include <boost/graph/graph_concepts.hpp> 10 10 #include <boost/graph/graph_archetypes.hpp> 11 11 #include <boost/graph/edge_list.hpp> 12 #include <boost/concept/assert.hpp> 12 13 #include <cstddef> 13 14 #include <iterator> 14 15 … … 24 25 25 26 typedef graph_traits<EdgeList>::edge_descriptor Edge; 26 27 27 function_requires< EdgeListGraphConcept<EdgeList> >();28 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<EdgeList> )); 28 29 29 function_requires<ReadablePropertyGraphConcept<EdgeList, Edge,30 edge_index_t> >();30 BOOST_CONCEPT_ASSERT(( ReadablePropertyGraphConcept<EdgeList, Edge, 31 edge_index_t> )); 31 32 } 32 33 return 0; 33 34 } -
libs/graph/test/test_graph.hpp
20 20 #include <utility> 21 21 #include <vector> 22 22 #include <boost/assert.hpp> 23 #include <boost/concept/assert.hpp> 23 24 #include <boost/graph/graph_concepts.hpp> 24 25 #include <boost/graph/graph_traits.hpp> 25 26 #include <boost/graph/graph_mutability_traits.hpp> -
libs/graph/test/stanford_graph_cc.cpp
9 9 #include <boost/graph/graph_concepts.hpp> 10 10 #include <boost/graph/graph_archetypes.hpp> 11 11 #include <boost/graph/stanford_graph.hpp> 12 #include <boost/concept/assert.hpp> 12 13 13 14 int main(int,char*[]) 14 15 { … … 18 19 typedef Graph* Graph; 19 20 typedef graph_traits<Graph>::vertex_descriptor Vertex; 20 21 typedef graph_traits<Graph>::edge_descriptor Edge; 21 function_requires< VertexListGraphConcept<Graph> >();22 function_requires< IncidenceGraphConcept<Graph> >();23 function_requires< AdjacencyGraphConcept<Graph> >();24 function_requires< PropertyGraphConcept<Graph, Edge, edge_length_t > >();25 function_requires<26 PropertyGraphConcept<Graph, Vertex, u_property<Vertex> > >();27 function_requires<28 PropertyGraphConcept<Graph, Edge, a_property<Vertex> > >();22 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 23 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> )); 24 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> )); 25 BOOST_CONCEPT_ASSERT(( PropertyGraphConcept<Graph, Edge, edge_length_t > )); 26 BOOST_CONCEPT_ASSERT(( 27 PropertyGraphConcept<Graph, Vertex, u_property<Vertex> > )); 28 BOOST_CONCEPT_ASSERT(( 29 PropertyGraphConcept<Graph, Edge, a_property<Vertex> > )); 29 30 } 30 31 { 31 32 typedef const Graph* Graph; 32 33 typedef graph_traits<Graph>::vertex_descriptor Vertex; 33 34 typedef graph_traits<Graph>::edge_descriptor Edge; 34 function_requires< VertexListGraphConcept<Graph> >();35 function_requires< IncidenceGraphConcept<Graph> >();36 function_requires< AdjacencyGraphConcept<Graph> >();37 function_requires<38 ReadablePropertyGraphConcept<Graph, Edge, edge_length_t > >();39 function_requires<40 ReadablePropertyGraphConcept<Graph, Vertex, u_property<Vertex> > >();41 function_requires<42 ReadablePropertyGraphConcept<Graph, Edge, a_property<Vertex> > >();35 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 36 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> )); 37 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> )); 38 BOOST_CONCEPT_ASSERT(( 39 ReadablePropertyGraphConcept<Graph, Edge, edge_length_t > )); 40 BOOST_CONCEPT_ASSERT(( 41 ReadablePropertyGraphConcept<Graph, Vertex, u_property<Vertex> > )); 42 BOOST_CONCEPT_ASSERT(( 43 ReadablePropertyGraphConcept<Graph, Edge, a_property<Vertex> > )); 43 44 } 44 45 return 0; 45 46 } -
libs/graph/test/leda_graph_cc.cpp
8 8 //======================================================================= 9 9 #include <boost/graph/graph_concepts.hpp> 10 10 #include <boost/graph/leda_graph.hpp> 11 #include <boost/concept/assert.hpp> 11 12 12 13 13 int 14 14 main(int,char*[]) 15 15 { … … 18 18 typedef leda::GRAPH<int,int> Graph; 19 19 typedef graph_traits<Graph>::vertex_descriptor Vertex; 20 20 typedef graph_traits<Graph>::edge_descriptor Edge; 21 function_requires< VertexListGraphConcept<Graph> >();22 function_requires< BidirectionalGraphConcept<Graph> >();23 function_requires< AdjacencyGraphConcept<Graph> >();24 function_requires< VertexMutableGraphConcept<Graph> >();25 function_requires< EdgeMutableGraphConcept<Graph> >();26 function_requires< VertexMutablePropertyGraphConcept<Graph> >();27 function_requires< EdgeMutablePropertyGraphConcept<Graph> >();28 function_requires<29 ReadablePropertyGraphConcept<Graph, Vertex, vertex_index_t> >();30 function_requires<31 ReadablePropertyGraphConcept<Graph, Edge, edge_index_t> >();32 function_requires<33 LvaluePropertyGraphConcept<Graph, Vertex, vertex_all_t> >();34 function_requires<35 LvaluePropertyGraphConcept<Graph, Vertex, edge_all_t> >();21 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 22 BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<Graph> )); 23 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> )); 24 BOOST_CONCEPT_ASSERT(( VertexMutableGraphConcept<Graph> )); 25 BOOST_CONCEPT_ASSERT(( EdgeMutableGraphConcept<Graph> )); 26 BOOST_CONCEPT_ASSERT(( VertexMutablePropertyGraphConcept<Graph> )); 27 BOOST_CONCEPT_ASSERT(( EdgeMutablePropertyGraphConcept<Graph> )); 28 BOOST_CONCEPT_ASSERT(( 29 ReadablePropertyGraphConcept<Graph, Vertex, vertex_index_t> )); 30 BOOST_CONCEPT_ASSERT(( 31 ReadablePropertyGraphConcept<Graph, Edge, edge_index_t> )); 32 BOOST_CONCEPT_ASSERT(( 33 LvaluePropertyGraphConcept<Graph, Vertex, vertex_all_t> )); 34 BOOST_CONCEPT_ASSERT(( 35 LvaluePropertyGraphConcept<Graph, Vertex, edge_all_t> )); 36 36 } 37 37 return 0; 38 38 } -
libs/graph/doc/transitive_closure.w
160 160 161 161 @d Concept checking 162 162 @{ 163 function_requires< VertexListGraphConcept<Graph> >();164 function_requires< AdjacencyGraphConcept<Graph> >();165 function_requires< VertexMutableGraphConcept<GraphTC> >();166 function_requires< EdgeMutableGraphConcept<GraphTC> >();167 function_requires< ReadablePropertyMapConcept<VertexIndexMap, vertex> >();163 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 164 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<Graph> )); 165 BOOST_CONCEPT_ASSERT(( VertexMutableGraphConcept<GraphTC> )); 166 BOOST_CONCEPT_ASSERT(( EdgeMutableGraphConcept<GraphTC> )); 167 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<VertexIndexMap, vertex> )); 168 168 @} 169 169 170 170 \noindent To simplify the code in the rest of the function we make the … … 566 566 typedef typename graph_traits<G>::vertex_descriptor vertex; 567 567 typedef typename graph_traits<G>::vertex_iterator vertex_iterator; 568 568 569 function_requires< AdjacencyMatrixConcept<G> >();570 function_requires< EdgeMutableGraphConcept<G> >();569 BOOST_CONCEPT_ASSERT(( AdjacencyMatrixConcept<G> )); 570 BOOST_CONCEPT_ASSERT(( EdgeMutableGraphConcept<G> )); 571 571 572 572 // Matrix form: 573 573 // for k … … 597 597 typedef typename graph_traits<G>::vertex_descriptor vertex; 598 598 typedef typename graph_traits<G>::vertex_iterator vertex_iterator; 599 599 600 function_requires< AdjacencyMatrixConcept<G> >();601 function_requires< EdgeMutableGraphConcept<G> >();600 BOOST_CONCEPT_ASSERT(( AdjacencyMatrixConcept<G> )); 601 BOOST_CONCEPT_ASSERT(( EdgeMutableGraphConcept<G> )); 602 602 603 603 // Make sure second loop will work 604 604 if (num_vertices(g) == 0) … … 671 671 #include <boost/graph/topological_sort.hpp> 672 672 #include <boost/graph/graph_concepts.hpp> 673 673 #include <boost/graph/named_function_params.hpp> 674 #include <boost/concept/assert.hpp> 674 675 675 676 namespace boost { 676 677 -
libs/graph/doc/BidirectionalGraph.html
145 145 typedef typename boost::graph_traits<G>::in_edge_iterator 146 146 in_edge_iterator; 147 147 void constraints() { 148 function_requires< IncidenceGraphConcept<G> >();149 function_requires< MultiPassInputIteratorConcept<in_edge_iterator> >();148 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<G> )); 149 BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept<in_edge_iterator> )); 150 150 151 151 p = in_edges(v, g); 152 152 e = *p.first; -
libs/graph/doc/AdjacencyGraph.html
112 112 typedef typename boost::graph_traits<G>::adjacency_iterator 113 113 adjacency_iterator; 114 114 void constraints() { 115 function_requires< IncidenceGraphConcept<G> >();116 function_requires< MultiPassInputIteratorConcept<adjacency_iterator> >();115 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<G> )); 116 BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept<adjacency_iterator> )); 117 117 118 118 p = adjacent_vertices(v, g); 119 119 v = *p.first; -
libs/graph/doc/IncidenceGraph.html
162 162 { 163 163 typedef typename boost::graph_traits<G>::out_edge_iterator out_edge_iterator; 164 164 void constraints() { 165 function_requires< GraphConcept<G> >();166 function_requires< MultiPassInputIteratorConcept<out_edge_iterator> >();165 BOOST_CONCEPT_ASSERT(( GraphConcept<G> )); 166 BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept<out_edge_iterator> )); 167 167 168 168 p = out_edges(u, g); 169 169 e = *p.first; -
libs/graph/doc/MutablePropertyGraph.html
125 125 { 126 126 typedef typename boost::graph_traits<G>::edge_descriptor edge_descriptor; 127 127 void constraints() { 128 function_requires< MutableGraphConcept<G> >();128 BOOST_CONCEPT_ASSERT(( MutableGraphConcept<G> )); 129 129 v = add_vertex(vp, g); 130 130 p = add_edge(u, v, ep, g); 131 131 } -
libs/graph/doc/AStarHeuristic.html
116 116 struct AStarHeuristicConcept { 117 117 void constraints() 118 118 { 119 function_requires< CopyConstructibleConcept<Heuristic> >();119 BOOST_CONCEPT_ASSERT(( CopyConstructibleConcept<Heuristic> )); 120 120 h(u); 121 121 } 122 122 Heuristic h; -
libs/graph/doc/isomorphism-impl-v2.w
388 388 @d Concept checking 389 389 @{ 390 390 // Graph requirements 391 function_requires< VertexListGraphConcept<Graph1> >();392 function_requires< EdgeListGraphConcept<Graph1> >();393 function_requires< VertexListGraphConcept<Graph2> >();394 function_requires< BidirectionalGraphConcept<Graph2> >();391 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph1> )); 392 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph1> )); 393 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph2> )); 394 BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<Graph2> )); 395 395 396 396 typedef typename graph_traits<Graph1>::vertex_descriptor vertex1_t; 397 397 typedef typename graph_traits<Graph2>::vertex_descriptor vertex2_t; 398 398 typedef typename graph_traits<Graph1>::vertices_size_type size_type; 399 399 400 400 // Vertex invariant requirement 401 function_requires<AdaptableUnaryFunctionConcept<Invariant1,402 size_type, vertex1_t> >();403 function_requires<AdaptableUnaryFunctionConcept<Invariant2,404 size_type, vertex2_t> >();401 BOOST_CONCEPT_ASSERT(( AdaptableUnaryFunctionConcept<Invariant1, 402 size_type, vertex1_t> )); 403 BOOST_CONCEPT_ASSERT(( AdaptableUnaryFunctionConcept<Invariant2, 404 size_type, vertex2_t> )); 405 405 406 406 // Property map requirements 407 function_requires< ReadWritePropertyMapConcept<IsoMapping, vertex1_t> >();407 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<IsoMapping, vertex1_t> )); 408 408 typedef typename property_traits<IsoMapping>::value_type IsoMappingValue; 409 409 BOOST_STATIC_ASSERT((is_same<IsoMappingValue, vertex2_t>::value)); 410 410 411 function_requires< ReadablePropertyMapConcept<IndexMap1, vertex1_t> >();411 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<IndexMap1, vertex1_t> )); 412 412 typedef typename property_traits<IndexMap1>::value_type IndexMap1Value; 413 413 BOOST_STATIC_ASSERT((is_convertible<IndexMap1Value, size_type>::value)); 414 414 415 function_requires< ReadablePropertyMapConcept<IndexMap2, vertex2_t> >();415 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<IndexMap2, vertex2_t> )); 416 416 typedef typename property_traits<IndexMap2>::value_type IndexMap2Value; 417 417 BOOST_STATIC_ASSERT((is_convertible<IndexMap2Value, size_type>::value)); 418 418 @} -
libs/graph/doc/Graph.html
121 121 typedef typename boost::graph_traits<G>::traversal_category traversal_category; 122 122 123 123 void constraints() { 124 function_requires< DefaultConstructibleConcept<vertex_descriptor> >();125 function_requires< EqualityComparableConcept<vertex_descriptor> >();126 function_requires< AssignableConcept<vertex_descriptor> >();127 function_requires< DefaultConstructibleConcept<edge_descriptor> >();128 function_requires< EqualityComparableConcept<edge_descriptor> >();129 function_requires< AssignableConcept<edge_descriptor> >();124 BOOST_CONCEPT_ASSERT(( DefaultConstructibleConcept<vertex_descriptor> )); 125 BOOST_CONCEPT_ASSERT(( EqualityComparableConcept<vertex_descriptor> )); 126 BOOST_CONCEPT_ASSERT(( AssignableConcept<vertex_descriptor> )); 127 BOOST_CONCEPT_ASSERT(( DefaultConstructibleConcept<edge_descriptor> )); 128 BOOST_CONCEPT_ASSERT(( EqualityComparableConcept<edge_descriptor> )); 129 BOOST_CONCEPT_ASSERT(( AssignableConcept<edge_descriptor> )); 130 130 } 131 131 G g; 132 132 }; -
libs/graph/doc/leda_conversion.html
236 236 main(int,char*[]) 237 237 { 238 238 typedef GRAPH<int,int> Graph; 239 function_requires< VertexListGraphConcept<Graph> >();240 function_requires< BidirectionalGraphConcept<Graph> >();241 function_requires< MutableGraphConcept<Graph> >();239 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 240 BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<Graph> )); 241 BOOST_CONCEPT_ASSERT(( MutableGraphConcept<Graph> )); 242 242 return 0; 243 243 } 244 244 </PRE> -
libs/graph/doc/isomorphism-impl-v3.w
507 507 @d Concept checking 508 508 @{ 509 509 // Graph requirements 510 function_requires< VertexListGraphConcept<Graph1> >();511 function_requires< EdgeListGraphConcept<Graph1> >();512 function_requires< VertexListGraphConcept<Graph2> >();513 function_requires< BidirectionalGraphConcept<Graph2> >();510 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph1> )); 511 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph1> )); 512 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph2> )); 513 BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<Graph2> )); 514 514 515 515 typedef typename graph_traits<Graph1>::vertex_descriptor vertex1_t; 516 516 typedef typename graph_traits<Graph2>::vertex_descriptor vertex2_t; 517 517 typedef typename graph_traits<Graph1>::vertices_size_type size_type; 518 518 519 519 // Vertex invariant requirement 520 function_requires<AdaptableUnaryFunctionConcept<Invariant1,521 size_type, vertex1_t> >();522 function_requires<AdaptableUnaryFunctionConcept<Invariant2,523 size_type, vertex2_t> >();520 BOOST_CONCEPT_ASSERT(( AdaptableUnaryFunctionConcept<Invariant1, 521 size_type, vertex1_t> )); 522 BOOST_CONCEPT_ASSERT(( AdaptableUnaryFunctionConcept<Invariant2, 523 size_type, vertex2_t> )); 524 524 525 525 // Property map requirements 526 function_requires< ReadWritePropertyMapConcept<IsoMapping, vertex1_t> >();526 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<IsoMapping, vertex1_t> )); 527 527 typedef typename property_traits<IsoMapping>::value_type IsoMappingValue; 528 528 BOOST_STATIC_ASSERT((is_same<IsoMappingValue, vertex2_t>::value)); 529 529 530 function_requires< ReadablePropertyMapConcept<IndexMap1, vertex1_t> >();530 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<IndexMap1, vertex1_t> )); 531 531 typedef typename property_traits<IndexMap1>::value_type IndexMap1Value; 532 532 BOOST_STATIC_ASSERT((is_convertible<IndexMap1Value, size_type>::value)); 533 533 534 function_requires< ReadablePropertyMapConcept<IndexMap2, vertex2_t> >();534 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<IndexMap2, vertex2_t> )); 535 535 typedef typename property_traits<IndexMap2>::value_type IndexMap2Value; 536 536 BOOST_STATIC_ASSERT((is_convertible<IndexMap2Value, size_type>::value)); 537 537 @} -
libs/graph/doc/biconnected_components.w
156 156 157 157 @d Concept checking of type parameters 158 158 @{ 159 function_requires< VertexListGraphConcept<Graph> >();160 function_requires< IncidenceGraphConcept<Graph> >();161 function_requires< WritablePropertyMapConcept<ComponentMap, edge_t> >();162 function_requires< ReadWritePropertyMapConcept<DiscoverTimeMap, vertex_t> >();163 function_requires< ReadWritePropertyMapConcept<LowPointMap, vertex_t> >();159 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 160 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<Graph> )); 161 BOOST_CONCEPT_ASSERT(( WritablePropertyMapConcept<ComponentMap, edge_t> )); 162 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<DiscoverTimeMap, vertex_t> )); 163 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<LowPointMap, vertex_t> )); 164 164 @} 165 165 166 166 The first step of the algorithm is to initialize the discover times of … … 286 286 #include <boost/graph/graph_traits.hpp> 287 287 #include <boost/graph/graph_concepts.hpp> 288 288 #include <boost/property_map/property_map.hpp> 289 #include <boost/concept/assert.hpp> 289 290 290 291 namespace boost { 291 292 @<Biconnected Components Algorithm@> -
libs/graph/doc/VertexListGraph.html
121 121 typedef typename boost::graph_traits<G>::vertex_iterator 122 122 vertex_iterator; 123 123 void constraints() { 124 function_requires< IncidenceGraphConcept<G> >();125 function_requires< AdjacencyGraphConcept<G> >();126 function_requires< MultiPassInputIteratorConcept<vertex_iterator> >();124 BOOST_CONCEPT_ASSERT(( IncidenceGraphConcept<G> )); 125 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<G> )); 126 BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept<vertex_iterator> )); 127 127 128 128 p = vertices(g); 129 129 V = num_vertices(g); -
libs/graph/doc/VertexAndEdgeListGraph.html
51 51 struct VertexAndEdgeListGraphConcept 52 52 { 53 53 void constraints() { 54 function_requires< VertexListGraphConcept<G> >();55 function_requires< EdgeListGraphConcept<G> >();54 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<G> )); 55 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<G> )); 56 56 } 57 57 }; 58 58 </PRE> -
libs/graph/doc/PropertyGraph.html
173 173 typedef typename property_map<G, PropertyTag>::type Map; 174 174 typedef typename property_map<G, PropertyTag>::const_type const_Map; 175 175 void constraints() { 176 function_requires< GraphConcept<G> >();177 function_requires< ReadWritePropertyMapConcept<Map, X> >();178 function_requires< ReadablePropertyMapConcept<const_Map, X> >();176 BOOST_CONCEPT_ASSERT(( GraphConcept<G> )); 177 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<Map, X> )); 178 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<const_Map, X> )); 179 179 180 180 Map pmap = get(PropertyTag(), g); 181 181 pval = get(PropertyTag(), g, x); -
libs/graph/doc/isomorphism-impl.w
301 301 @d Concept checking 302 302 @{ 303 303 // Graph requirements 304 function_requires< VertexListGraphConcept<Graph1> >();305 function_requires< EdgeListGraphConcept<Graph1> >();306 function_requires< VertexListGraphConcept<Graph2> >();307 function_requires< BidirectionalGraphConcept<Graph2> >();304 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph1> )); 305 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<Graph1> )); 306 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph2> )); 307 BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<Graph2> )); 308 308 309 309 // Property map requirements 310 function_requires< ReadWritePropertyMapConcept<IndexMapping, vertex1_t> >();310 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<IndexMapping, vertex1_t> )); 311 311 typedef typename property_traits<IndexMapping>::value_type IndexMappingValue; 312 312 BOOST_STATIC_ASSERT((is_same<IndexMappingValue, vertex2_t>::value)); 313 313 314 function_requires< ReadablePropertyMapConcept<IndexMap1, vertex1_t> >();314 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<IndexMap1, vertex1_t> )); 315 315 typedef typename property_traits<IndexMap1>::value_type IndexMap1Value; 316 316 BOOST_STATIC_ASSERT((is_convertible<IndexMap1Value, size_type>::value)); 317 317 318 function_requires< ReadablePropertyMapConcept<IndexMap2, vertex2_t> >();318 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<IndexMap2, vertex2_t> )); 319 319 typedef typename property_traits<IndexMap2>::value_type IndexMap2Value; 320 320 BOOST_STATIC_ASSERT((is_convertible<IndexMap2Value, size_type>::value)); 321 321 @} -
libs/graph/doc/MutableGraph.html
250 250 struct MutableIncidenceGraphConcept 251 251 { 252 252 void constraints() { 253 function_requires< MutableGraph<G> >();253 BOOST_CONCEPT_ASSERT(( MutableGraph<G> )); 254 254 remove_edge(iter, g); 255 255 remove_out_edge_if(u, p, g); 256 256 } … … 265 265 struct MutableBidirectionalGraphConcept 266 266 { 267 267 void constraints() { 268 function_requires< MutableIncidenceGraph<G> >();268 BOOST_CONCEPT_ASSERT(( MutableIncidenceGraph<G> )); 269 269 remove_in_edge_if(u, p, g); 270 270 } 271 271 G g; … … 278 278 struct MutableEdgeListGraphConcept 279 279 { 280 280 void constraints() { 281 function_requires< MutableGraph<G> >();281 BOOST_CONCEPT_ASSERT(( MutableGraph<G> )); 282 282 remove_edge_if(p, g); 283 283 } 284 284 G g; -
libs/graph/doc/constructing_algorithms.html
79 79 href="./VertexListGraph.html">VertexListGraph</a>. This is enforced by 80 80 the use of those graph operations in the algorithm, and furthermore by 81 81 our explicit requirement added as a concept check with 82 <TT> function_requires()</TT> (see Section <A82 <TT>BOOST_CONCEPT_ASSERT()</TT> (see Section <A 83 83 HREF="../../concept_check/concept_check.htm">Concept 84 84 Checking</A> for more details about concept checking). 85 85 … … 122 122 typedef typename property_traits<Color>::value_type ColorType; 123 123 typedef typename property_traits<Order>::value_type OrderType; 124 124 125 function_requires< VertexListGraphConcept<VertexListGraph> >();126 function_requires< ReadWritePropertyMapConcept<Color, vertex_descriptor> >();127 function_requires< IntegerConcept<ColorType> >();128 function_requires< ReadablePropertyMapConcept<Order, size_type> >();125 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<VertexListGraph> )); 126 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMapConcept<Color, vertex_descriptor> )); 127 BOOST_CONCEPT_ASSERT(( IntegerConcept<ColorType> )); 128 BOOST_CONCEPT_ASSERT(( ReadablePropertyMapConcept<Order, size_type> )); 129 129 BOOST_STATIC_ASSERT((is_same<OrderType, vertex_descriptor>::value)); 130 130 131 131 size_type max_color = 0; -
libs/graph/doc/EdgeListGraph.html
146 146 typedef typename boost::graph_traits<G>::edge_iterator 147 147 edge_iterator; 148 148 void constraints() { 149 function_requires< GraphConcept<G> >();150 function_requires< MultiPassInputIteratorConcept<edge_iterator> >();149 BOOST_CONCEPT_ASSERT(( GraphConcept<G> )); 150 BOOST_CONCEPT_ASSERT(( MultiPassInputIteratorConcept<edge_iterator> )); 151 151 152 152 p = edges(g); 153 153 E = num_edges(g); -
libs/graph/doc/KeyedUpdatableQueue.html
63 63 typedef typename Q::key_map key_map; 64 64 65 65 void constraints() { 66 function_requires< UpdatableQueue<Q> >();67 function_requires< ReadWritePropertyMap< key_map, typename Buffer<Q>::value_type > >();66 BOOST_CONCEPT_ASSERT(( UpdatableQueue<Q> )); 67 BOOST_CONCEPT_ASSERT(( ReadWritePropertyMap< key_map, typename Buffer<Q>::value_type > )); 68 68 } 69 69 70 70 void const_constraints(const Q& cq) { -
libs/graph/doc/UpdatableQueue.html
58 58 struct UpdatableQueueConcept 59 59 { 60 60 void constraints() { 61 function_requires< Buffer<Q> >();61 BOOST_CONCEPT_ASSERT(( Buffer<Q> )); 62 62 63 63 q.update(g_ct); 64 64 } -
libs/graph/example/implicit_graph.cpp
4 4 // (See accompanying file LICENSE_1_0.txt or copy at 5 5 // http://www.boost.org/LICENSE_1_0.txt) 6 6 7 7 #include <boost/concept/assert.hpp> 8 8 #include <boost/graph/adjacency_iterator.hpp> 9 9 #include <boost/graph/dijkstra_shortest_paths.hpp> 10 10 #include <boost/graph/graph_concepts.hpp> … … 444 444 // Check the concepts that graph models. This is included to demonstrate 445 445 // how concept checking works, but is not required for a working program 446 446 // since Boost algorithms do their own concept checking. 447 function_requires< BidirectionalGraphConcept<ring_graph> >();448 function_requires< AdjacencyGraphConcept<ring_graph> >();449 function_requires< VertexListGraphConcept<ring_graph> >();450 function_requires< EdgeListGraphConcept<ring_graph> >();451 function_requires< AdjacencyMatrixConcept<ring_graph> >();452 function_requires<453 ReadablePropertyMapConcept<const_edge_weight_map, edge_descriptor> >();454 function_requires<455 ReadablePropertyGraphConcept<ring_graph, edge_descriptor, edge_weight_t> >();447 BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<ring_graph> )); 448 BOOST_CONCEPT_ASSERT(( AdjacencyGraphConcept<ring_graph> )); 449 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<ring_graph> )); 450 BOOST_CONCEPT_ASSERT(( EdgeListGraphConcept<ring_graph> )); 451 BOOST_CONCEPT_ASSERT(( AdjacencyMatrixConcept<ring_graph> )); 452 BOOST_CONCEPT_ASSERT(( 453 ReadablePropertyMapConcept<const_edge_weight_map, edge_descriptor> )); 454 BOOST_CONCEPT_ASSERT(( 455 ReadablePropertyGraphConcept<ring_graph, edge_descriptor, edge_weight_t> )); 456 456 457 457 // Specify the size of the graph on the command line, or use a default size 458 458 // of 5. -
libs/graph/example/put-get-helper-eg.cpp
8 8 #include <vector> 9 9 #include <string> 10 10 #include <boost/property_map/property_map.hpp> 11 #include <boost/concept/assert.hpp> 11 12 12 13 #ifdef BOOST_NO_STD_ITERATOR_TRAITS 13 14 #error This examples requires a compiler that provides a working std::iterator_traits … … 53 54 typedef foo::iterator_property_map < vec_t::iterator, 54 55 boost::identity_property_map > pmap_t; 55 56 using namespace boost; 56 function_requires < Mutable_LvaluePropertyMapConcept < pmap_t, int > >();57 BOOST_CONCEPT_ASSERT(( Mutable_LvaluePropertyMapConcept<pmap_t, int> )); 57 58 return 0; 58 59 } -
libs/graph/example/loops_dfs.cpp
6 6 // http://www.boost.org/LICENSE_1_0.txt) 7 7 //======================================================================= 8 8 #include <boost/config.hpp> 9 #include <boost/concept/assert.hpp> 9 10 #include <iostream> 10 11 #include <fstream> 11 12 #include <stack> … … 47 48 const Graph & g, 48 49 Loops & loops) // A container of sets of vertices 49 50 { 50 function_requires < BidirectionalGraphConcept < Graph > >();51 BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<Graph> )); 51 52 typedef typename graph_traits < Graph >::edge_descriptor Edge; 52 53 typedef typename graph_traits < Graph >::vertex_descriptor Vertex; 53 54 std::vector < Edge > back_edges; … … 69 70 Graph >::edge_descriptor back_edge, const Graph & g, 70 71 Set & loop_set) 71 72 { 72 function_requires < BidirectionalGraphConcept < Graph > >();73 BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept<Graph> )); 73 74 typedef typename graph_traits < Graph >::vertex_descriptor Vertex; 74 75 typedef color_traits < default_color_type > Color; 75 76 -
libs/graph/example/leda-concept-check.cpp
7 7 //======================================================================= 8 8 #include <boost/graph/graph_concepts.hpp> 9 9 #include <boost/graph/leda_graph.hpp> 10 #include <boost/concept/assert.hpp> 10 11 11 12 int 12 13 main() 13 14 { 14 15 using namespace boost; 15 typedef leda::GRAPH < int, int >Graph;16 function_requires < VertexListGraphConcept < Graph > >();17 function_requires < BidirectionalGraphConcept < Graph > >();18 function_requires < VertexMutableGraphConcept < Graph > >();19 function_requires < EdgeMutableGraphConcept < Graph > >();16 typedef leda::GRAPH<int, int> Graph; 17 BOOST_CONCEPT_ASSERT(( VertexListGraphConcept<Graph> )); 18 BOOST_CONCEPT_ASSERT(( BidirectionalGraphConcept< Graph> )); 19 BOOST_CONCEPT_ASSERT(( VertexMutableGraphConcept< Graph> )); 20 BOOST_CONCEPT_ASSERT(( EdgeMutableGraphConcept<Graph> )); 20 21 return EXIT_SUCCESS; 21 22 } -
libs/concept_check/reference.htm
366 366 void function_requires(); 367 367 </pre> 368 368 369 <p><code>function_requires()</code> has been deprecated in favor of <code>BOOST_CONCEPT_ASSERT</code>. 370 This means that <del><code>function_requires< Concept<Type> >();</code></del> 371 becomes <code>BOOST_CONCEPT_ASSERT((Concept<Type>));</code> 372 (don't forget to <code>#include "boost/concept/assert.hpp"</code>). 373 374 369 375 <h3><a name="deprecated-macros" id="deprecated-macros">Deprecated 370 376 Macros</a></h3> 371 377 <pre>