graph_concepts.hpp 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619
  1. //
  2. //=======================================================================
  3. // Copyright 1997, 1998, 1999, 2000 University of Notre Dame.
  4. // Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
  5. //
  6. // Copyright 2009, Andrew Sutton
  7. //
  8. // Distributed under the Boost Software License, Version 1.0. (See
  9. // accompanying file LICENSE_1_0.txt or copy at
  10. // http://www.boost.org/LICENSE_1_0.txt)
  11. //=======================================================================
  12. //
  13. #ifndef BOOST_GRAPH_CONCEPTS_HPP
  14. #define BOOST_GRAPH_CONCEPTS_HPP
  15. #include <boost/config.hpp>
  16. #include <boost/property_map/property_map.hpp>
  17. #include <boost/graph/graph_traits.hpp>
  18. #include <boost/graph/properties.hpp>
  19. #include <boost/graph/numeric_values.hpp>
  20. #include <boost/graph/buffer_concepts.hpp>
  21. #include <boost/concept_check.hpp>
  22. #include <boost/type_traits/is_same.hpp>
  23. #include <boost/mpl/not.hpp>
  24. #include <boost/static_assert.hpp>
  25. #include <boost/detail/workaround.hpp>
  26. #include <boost/concept/assert.hpp>
  27. #include <boost/concept/detail/concept_def.hpp>
  28. namespace boost
  29. {
  30. // dwa 2003/7/11 -- This clearly shouldn't be necessary, but if
  31. // you want to use vector_as_graph, it is! I'm sure the graph
  32. // library leaves these out all over the place. Probably a
  33. // redesign involving specializing a template with a static
  34. // member function is in order :(
  35. //
  36. // It is needed in order to allow us to write using boost::vertices as
  37. // needed for ADL when using vector_as_graph below.
  38. #if !defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) \
  39. && !BOOST_WORKAROUND(__GNUC__, <= 2) \
  40. && !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
  41. # define BOOST_VECTOR_AS_GRAPH_GRAPH_ADL_HACK
  42. #endif
  43. #ifdef BOOST_VECTOR_AS_GRAPH_GRAPH_ADL_HACK
  44. template <class T>
  45. typename T::ThereReallyIsNoMemberByThisNameInT vertices(T const&);
  46. #endif
  47. namespace concepts {
  48. BOOST_concept(MultiPassInputIterator,(T)) {
  49. BOOST_CONCEPT_USAGE(MultiPassInputIterator) {
  50. BOOST_CONCEPT_ASSERT((InputIterator<T>));
  51. }
  52. };
  53. BOOST_concept(Graph,(G))
  54. {
  55. typedef typename graph_traits<G>::vertex_descriptor vertex_descriptor;
  56. typedef typename graph_traits<G>::edge_descriptor edge_descriptor;
  57. typedef typename graph_traits<G>::directed_category directed_category;
  58. typedef typename graph_traits<G>::edge_parallel_category edge_parallel_category;
  59. typedef typename graph_traits<G>::traversal_category traversal_category;
  60. BOOST_CONCEPT_USAGE(Graph)
  61. {
  62. BOOST_CONCEPT_ASSERT((DefaultConstructible<vertex_descriptor>));
  63. BOOST_CONCEPT_ASSERT((EqualityComparable<vertex_descriptor>));
  64. BOOST_CONCEPT_ASSERT((Assignable<vertex_descriptor>));
  65. }
  66. G g;
  67. };
  68. BOOST_concept(IncidenceGraph,(G))
  69. : Graph<G>
  70. {
  71. typedef typename graph_traits<G>::edge_descriptor edge_descriptor;
  72. typedef typename graph_traits<G>::out_edge_iterator out_edge_iterator;
  73. typedef typename graph_traits<G>::degree_size_type degree_size_type;
  74. typedef typename graph_traits<G>::traversal_category traversal_category;
  75. BOOST_STATIC_ASSERT((boost::mpl::not_<boost::is_same<out_edge_iterator, void> >::value));
  76. BOOST_STATIC_ASSERT((boost::mpl::not_<boost::is_same<degree_size_type, void> >::value));
  77. BOOST_CONCEPT_USAGE(IncidenceGraph) {
  78. BOOST_CONCEPT_ASSERT((MultiPassInputIterator<out_edge_iterator>));
  79. BOOST_CONCEPT_ASSERT((DefaultConstructible<edge_descriptor>));
  80. BOOST_CONCEPT_ASSERT((EqualityComparable<edge_descriptor>));
  81. BOOST_CONCEPT_ASSERT((Assignable<edge_descriptor>));
  82. BOOST_CONCEPT_ASSERT((Convertible<traversal_category,
  83. incidence_graph_tag>));
  84. p = out_edges(u, g);
  85. n = out_degree(u, g);
  86. e = *p.first;
  87. u = source(e, g);
  88. v = target(e, g);
  89. const_constraints(g);
  90. }
  91. void const_constraints(const G& cg) {
  92. p = out_edges(u, cg);
  93. n = out_degree(u, cg);
  94. e = *p.first;
  95. u = source(e, cg);
  96. v = target(e, cg);
  97. }
  98. std::pair<out_edge_iterator, out_edge_iterator> p;
  99. typename graph_traits<G>::vertex_descriptor u, v;
  100. typename graph_traits<G>::edge_descriptor e;
  101. typename graph_traits<G>::degree_size_type n;
  102. G g;
  103. };
  104. BOOST_concept(BidirectionalGraph,(G))
  105. : IncidenceGraph<G>
  106. {
  107. typedef typename graph_traits<G>::in_edge_iterator
  108. in_edge_iterator;
  109. typedef typename graph_traits<G>::traversal_category
  110. traversal_category;
  111. BOOST_CONCEPT_USAGE(BidirectionalGraph) {
  112. BOOST_CONCEPT_ASSERT((MultiPassInputIterator<in_edge_iterator>));
  113. BOOST_CONCEPT_ASSERT((Convertible<traversal_category,
  114. bidirectional_graph_tag>));
  115. BOOST_STATIC_ASSERT((boost::mpl::not_<boost::is_same<in_edge_iterator, void> >::value));
  116. p = in_edges(v, g);
  117. n = in_degree(v, g);
  118. e = *p.first;
  119. const_constraints(g);
  120. }
  121. void const_constraints(const G& cg) {
  122. p = in_edges(v, cg);
  123. n = in_degree(v, cg);
  124. e = *p.first;
  125. }
  126. std::pair<in_edge_iterator, in_edge_iterator> p;
  127. typename graph_traits<G>::vertex_descriptor v;
  128. typename graph_traits<G>::edge_descriptor e;
  129. typename graph_traits<G>::degree_size_type n;
  130. G g;
  131. };
  132. BOOST_concept(AdjacencyGraph,(G))
  133. : Graph<G>
  134. {
  135. typedef typename graph_traits<G>::adjacency_iterator
  136. adjacency_iterator;
  137. typedef typename graph_traits<G>::traversal_category
  138. traversal_category;
  139. BOOST_CONCEPT_USAGE(AdjacencyGraph) {
  140. BOOST_CONCEPT_ASSERT((MultiPassInputIterator<adjacency_iterator>));
  141. BOOST_CONCEPT_ASSERT((Convertible<traversal_category,
  142. adjacency_graph_tag>));
  143. BOOST_STATIC_ASSERT((boost::mpl::not_<boost::is_same<adjacency_iterator, void> >::value));
  144. p = adjacent_vertices(v, g);
  145. v = *p.first;
  146. const_constraints(g);
  147. }
  148. void const_constraints(const G& cg) {
  149. p = adjacent_vertices(v, cg);
  150. }
  151. std::pair<adjacency_iterator,adjacency_iterator> p;
  152. typename graph_traits<G>::vertex_descriptor v;
  153. G g;
  154. };
  155. BOOST_concept(VertexListGraph,(G))
  156. : Graph<G>
  157. {
  158. typedef typename graph_traits<G>::vertex_iterator vertex_iterator;
  159. typedef typename graph_traits<G>::vertices_size_type vertices_size_type;
  160. typedef typename graph_traits<G>::traversal_category
  161. traversal_category;
  162. BOOST_CONCEPT_USAGE(VertexListGraph) {
  163. BOOST_CONCEPT_ASSERT((MultiPassInputIterator<vertex_iterator>));
  164. BOOST_CONCEPT_ASSERT((Convertible<traversal_category,
  165. vertex_list_graph_tag>));
  166. BOOST_STATIC_ASSERT((boost::mpl::not_<boost::is_same<vertex_iterator, void> >::value));
  167. BOOST_STATIC_ASSERT((boost::mpl::not_<boost::is_same<vertices_size_type, void> >::value));
  168. #ifdef BOOST_VECTOR_AS_GRAPH_GRAPH_ADL_HACK
  169. // dwa 2003/7/11 -- This clearly shouldn't be necessary, but if
  170. // you want to use vector_as_graph, it is! I'm sure the graph
  171. // library leaves these out all over the place. Probably a
  172. // redesign involving specializing a template with a static
  173. // member function is in order :(
  174. using boost::vertices;
  175. #endif
  176. p = vertices(g);
  177. v = *p.first;
  178. const_constraints(g);
  179. }
  180. void const_constraints(const G& cg) {
  181. #ifdef BOOST_VECTOR_AS_GRAPH_GRAPH_ADL_HACK
  182. // dwa 2003/7/11 -- This clearly shouldn't be necessary, but if
  183. // you want to use vector_as_graph, it is! I'm sure the graph
  184. // library leaves these out all over the place. Probably a
  185. // redesign involving specializing a template with a static
  186. // member function is in order :(
  187. using boost::vertices;
  188. #endif
  189. p = vertices(cg);
  190. v = *p.first;
  191. V = num_vertices(cg);
  192. }
  193. std::pair<vertex_iterator,vertex_iterator> p;
  194. typename graph_traits<G>::vertex_descriptor v;
  195. G g;
  196. vertices_size_type V;
  197. };
  198. BOOST_concept(EdgeListGraph,(G))
  199. : Graph<G>
  200. {
  201. typedef typename graph_traits<G>::edge_descriptor edge_descriptor;
  202. typedef typename graph_traits<G>::edge_iterator edge_iterator;
  203. typedef typename graph_traits<G>::edges_size_type edges_size_type;
  204. typedef typename graph_traits<G>::traversal_category
  205. traversal_category;
  206. BOOST_CONCEPT_USAGE(EdgeListGraph) {
  207. BOOST_CONCEPT_ASSERT((MultiPassInputIterator<edge_iterator>));
  208. BOOST_CONCEPT_ASSERT((DefaultConstructible<edge_descriptor>));
  209. BOOST_CONCEPT_ASSERT((EqualityComparable<edge_descriptor>));
  210. BOOST_CONCEPT_ASSERT((Assignable<edge_descriptor>));
  211. BOOST_CONCEPT_ASSERT((Convertible<traversal_category,
  212. edge_list_graph_tag>));
  213. BOOST_STATIC_ASSERT((boost::mpl::not_<boost::is_same<edge_iterator, void> >::value));
  214. BOOST_STATIC_ASSERT((boost::mpl::not_<boost::is_same<edges_size_type, void> >::value));
  215. p = edges(g);
  216. e = *p.first;
  217. u = source(e, g);
  218. v = target(e, g);
  219. const_constraints(g);
  220. }
  221. void const_constraints(const G& cg) {
  222. p = edges(cg);
  223. E = num_edges(cg);
  224. e = *p.first;
  225. u = source(e, cg);
  226. v = target(e, cg);
  227. }
  228. std::pair<edge_iterator,edge_iterator> p;
  229. typename graph_traits<G>::vertex_descriptor u, v;
  230. typename graph_traits<G>::edge_descriptor e;
  231. edges_size_type E;
  232. G g;
  233. };
  234. BOOST_concept(VertexAndEdgeListGraph,(G))
  235. : VertexListGraph<G>
  236. , EdgeListGraph<G>
  237. {
  238. };
  239. // Where to put the requirement for this constructor?
  240. // G g(n_vertices);
  241. // Not in mutable graph, then LEDA graph's can't be models of
  242. // MutableGraph.
  243. BOOST_concept(EdgeMutableGraph,(G))
  244. {
  245. typedef typename graph_traits<G>::edge_descriptor edge_descriptor;
  246. BOOST_CONCEPT_USAGE(EdgeMutableGraph) {
  247. p = add_edge(u, v, g);
  248. remove_edge(u, v, g);
  249. remove_edge(e, g);
  250. clear_vertex(v, g);
  251. }
  252. G g;
  253. edge_descriptor e;
  254. std::pair<edge_descriptor, bool> p;
  255. typename graph_traits<G>::vertex_descriptor u, v;
  256. };
  257. BOOST_concept(VertexMutableGraph,(G))
  258. {
  259. BOOST_CONCEPT_USAGE(VertexMutableGraph) {
  260. v = add_vertex(g);
  261. remove_vertex(v, g);
  262. }
  263. G g;
  264. typename graph_traits<G>::vertex_descriptor u, v;
  265. };
  266. BOOST_concept(MutableGraph,(G))
  267. : EdgeMutableGraph<G>
  268. , VertexMutableGraph<G>
  269. {
  270. };
  271. template <class edge_descriptor>
  272. struct dummy_edge_predicate {
  273. bool operator()(const edge_descriptor&) const {
  274. return false;
  275. }
  276. };
  277. BOOST_concept(MutableIncidenceGraph,(G))
  278. : MutableGraph<G>
  279. {
  280. BOOST_CONCEPT_USAGE(MutableIncidenceGraph) {
  281. remove_edge(iter, g);
  282. remove_out_edge_if(u, p, g);
  283. }
  284. G g;
  285. typedef typename graph_traits<G>::edge_descriptor edge_descriptor;
  286. dummy_edge_predicate<edge_descriptor> p;
  287. typename boost::graph_traits<G>::vertex_descriptor u;
  288. typename boost::graph_traits<G>::out_edge_iterator iter;
  289. };
  290. BOOST_concept(MutableBidirectionalGraph,(G))
  291. : MutableIncidenceGraph<G>
  292. {
  293. BOOST_CONCEPT_USAGE(MutableBidirectionalGraph)
  294. {
  295. remove_in_edge_if(u, p, g);
  296. }
  297. G g;
  298. typedef typename graph_traits<G>::edge_descriptor edge_descriptor;
  299. dummy_edge_predicate<edge_descriptor> p;
  300. typename boost::graph_traits<G>::vertex_descriptor u;
  301. };
  302. BOOST_concept(MutableEdgeListGraph,(G))
  303. : EdgeMutableGraph<G>
  304. {
  305. BOOST_CONCEPT_USAGE(MutableEdgeListGraph) {
  306. remove_edge_if(p, g);
  307. }
  308. G g;
  309. typedef typename graph_traits<G>::edge_descriptor edge_descriptor;
  310. dummy_edge_predicate<edge_descriptor> p;
  311. };
  312. BOOST_concept(VertexMutablePropertyGraph,(G))
  313. : VertexMutableGraph<G>
  314. {
  315. BOOST_CONCEPT_USAGE(VertexMutablePropertyGraph) {
  316. v = add_vertex(vp, g);
  317. }
  318. G g;
  319. typename graph_traits<G>::vertex_descriptor v;
  320. typename vertex_property_type<G>::type vp;
  321. };
  322. BOOST_concept(EdgeMutablePropertyGraph,(G))
  323. : EdgeMutableGraph<G>
  324. {
  325. typedef typename graph_traits<G>::edge_descriptor edge_descriptor;
  326. BOOST_CONCEPT_USAGE(EdgeMutablePropertyGraph) {
  327. p = add_edge(u, v, ep, g);
  328. }
  329. G g;
  330. std::pair<edge_descriptor, bool> p;
  331. typename graph_traits<G>::vertex_descriptor u, v;
  332. typename edge_property_type<G>::type ep;
  333. };
  334. BOOST_concept(AdjacencyMatrix,(G))
  335. : Graph<G>
  336. {
  337. typedef typename graph_traits<G>::edge_descriptor edge_descriptor;
  338. BOOST_CONCEPT_USAGE(AdjacencyMatrix) {
  339. p = edge(u, v, g);
  340. const_constraints(g);
  341. }
  342. void const_constraints(const G& cg) {
  343. p = edge(u, v, cg);
  344. }
  345. typename graph_traits<G>::vertex_descriptor u, v;
  346. std::pair<edge_descriptor, bool> p;
  347. G g;
  348. };
  349. BOOST_concept(ReadablePropertyGraph,(G)(X)(Property))
  350. : Graph<G>
  351. {
  352. typedef typename property_map<G, Property>::const_type const_Map;
  353. BOOST_CONCEPT_USAGE(ReadablePropertyGraph)
  354. {
  355. BOOST_CONCEPT_ASSERT((ReadablePropertyMapConcept<const_Map, X>));
  356. const_constraints(g);
  357. }
  358. void const_constraints(const G& cg) {
  359. const_Map pmap = get(Property(), cg);
  360. pval = get(Property(), cg, x);
  361. ignore_unused_variable_warning(pmap);
  362. }
  363. G g;
  364. X x;
  365. typename property_traits<const_Map>::value_type pval;
  366. };
  367. BOOST_concept(PropertyGraph,(G)(X)(Property))
  368. : ReadablePropertyGraph<G, X, Property>
  369. {
  370. typedef typename property_map<G, Property>::type Map;
  371. BOOST_CONCEPT_USAGE(PropertyGraph) {
  372. BOOST_CONCEPT_ASSERT((ReadWritePropertyMapConcept<Map, X>));
  373. Map pmap = get(Property(), g);
  374. pval = get(Property(), g, x);
  375. put(Property(), g, x, pval);
  376. ignore_unused_variable_warning(pmap);
  377. }
  378. G g;
  379. X x;
  380. typename property_traits<Map>::value_type pval;
  381. };
  382. BOOST_concept(LvaluePropertyGraph,(G)(X)(Property))
  383. : ReadablePropertyGraph<G, X, Property>
  384. {
  385. typedef typename property_map<G, Property>::type Map;
  386. typedef typename property_map<G, Property>::const_type const_Map;
  387. BOOST_CONCEPT_USAGE(LvaluePropertyGraph) {
  388. BOOST_CONCEPT_ASSERT((LvaluePropertyMapConcept<const_Map, X>));
  389. pval = get(Property(), g, x);
  390. put(Property(), g, x, pval);
  391. }
  392. G g;
  393. X x;
  394. typename property_traits<Map>::value_type pval;
  395. };
  396. // The *IndexGraph concepts are "semantic" graph concpepts. These can be
  397. // applied to describe any graph that has an index map that can be accessed
  398. // using the get(*_index, g) method. For example, adjacency lists with
  399. // VertexSet == vecS are implicitly models of this concept.
  400. //
  401. // NOTE: We could require an associated type vertex_index_type, but that
  402. // would mean propagating that type name into graph_traits and all of the
  403. // other graph implementations. Much easier to simply call it unsigned.
  404. BOOST_concept(VertexIndexGraph,(Graph))
  405. {
  406. BOOST_CONCEPT_USAGE(VertexIndexGraph)
  407. {
  408. typedef typename graph_traits<Graph>::vertex_descriptor Vertex;
  409. typedef typename property_map<Graph, vertex_index_t>::type Map;
  410. typedef unsigned Index; // This could be Graph::vertex_index_type
  411. Map m = get(vertex_index, g);
  412. Index x = get(vertex_index, g, Vertex());
  413. ignore_unused_variable_warning(m);
  414. ignore_unused_variable_warning(x);
  415. // This is relaxed
  416. renumber_vertex_indices(g);
  417. const_constraints(g);
  418. }
  419. void const_constraints(const Graph& g)
  420. {
  421. typedef typename property_map<Graph, vertex_index_t>::const_type Map;
  422. Map m = get(vertex_index, g);
  423. ignore_unused_variable_warning(m);
  424. }
  425. private:
  426. Graph g;
  427. };
  428. BOOST_concept(EdgeIndexGraph,(Graph))
  429. {
  430. BOOST_CONCEPT_USAGE(EdgeIndexGraph)
  431. {
  432. typedef typename graph_traits<Graph>::edge_descriptor Edge;
  433. typedef typename property_map<Graph, edge_index_t>::type Map;
  434. typedef unsigned Index; // This could be Graph::vertex_index_type
  435. Map m = get(edge_index, g);
  436. Index x = get(edge_index, g, Edge());
  437. ignore_unused_variable_warning(m);
  438. ignore_unused_variable_warning(x);
  439. // This is relaxed
  440. renumber_edge_indices(g);
  441. const_constraints(g);
  442. }
  443. void const_constraints(const Graph& g)
  444. {
  445. typedef typename property_map<Graph, edge_index_t>::const_type Map;
  446. Map m = get(edge_index, g);
  447. ignore_unused_variable_warning(m);
  448. }
  449. private:
  450. Graph g;
  451. };
  452. BOOST_concept(ColorValue,(C))
  453. : EqualityComparable<C>
  454. , DefaultConstructible<C>
  455. {
  456. BOOST_CONCEPT_USAGE(ColorValue) {
  457. c = color_traits<C>::white();
  458. c = color_traits<C>::gray();
  459. c = color_traits<C>::black();
  460. }
  461. C c;
  462. };
  463. BOOST_concept(BasicMatrix,(M)(I)(V))
  464. {
  465. BOOST_CONCEPT_USAGE(BasicMatrix) {
  466. V& elt = A[i][j];
  467. const_constraints(A);
  468. ignore_unused_variable_warning(elt);
  469. }
  470. void const_constraints(const M& cA) {
  471. const V& elt = cA[i][j];
  472. ignore_unused_variable_warning(elt);
  473. }
  474. M A;
  475. I i, j;
  476. };
  477. // The following concepts describe aspects of numberic values and measure
  478. // functions. We're extending the notion of numeric values to include
  479. // emulation for zero and infinity.
  480. BOOST_concept(NumericValue,(Numeric))
  481. {
  482. BOOST_CONCEPT_USAGE(NumericValue)
  483. {
  484. BOOST_CONCEPT_ASSERT(( DefaultConstructible<Numeric> ));
  485. BOOST_CONCEPT_ASSERT(( CopyConstructible<Numeric> ));
  486. numeric_values<Numeric>::zero();
  487. numeric_values<Numeric>::infinity();
  488. }
  489. };
  490. BOOST_concept(DegreeMeasure,(Measure)(Graph))
  491. {
  492. BOOST_CONCEPT_USAGE(DegreeMeasure)
  493. {
  494. typedef typename Measure::degree_type Degree;
  495. typedef typename Measure::vertex_type Vertex;
  496. Degree d = m(Vertex(), g);
  497. ignore_unused_variable_warning(d);
  498. }
  499. private:
  500. Measure m;
  501. Graph g;
  502. };
  503. BOOST_concept(DistanceMeasure,(Measure)(Graph))
  504. {
  505. BOOST_CONCEPT_USAGE(DistanceMeasure)
  506. {
  507. typedef typename Measure::distance_type Distance;
  508. typedef typename Measure::result_type Result;
  509. Result r = m(Distance(), g);
  510. ignore_unused_variable_warning(r);
  511. }
  512. private:
  513. Measure m;
  514. Graph g;
  515. };
  516. } /* namespace concepts */
  517. using boost::concepts::MultiPassInputIteratorConcept;
  518. // Graph concepts
  519. using boost::concepts::GraphConcept;
  520. using boost::concepts::IncidenceGraphConcept;
  521. using boost::concepts::BidirectionalGraphConcept;
  522. using boost::concepts::AdjacencyGraphConcept;
  523. using boost::concepts::VertexListGraphConcept;
  524. using boost::concepts::EdgeListGraphConcept;
  525. using boost::concepts::VertexAndEdgeListGraphConcept;
  526. using boost::concepts::EdgeMutableGraphConcept;
  527. using boost::concepts::VertexMutableGraphConcept;
  528. using boost::concepts::MutableGraphConcept;
  529. using boost::concepts::MutableIncidenceGraphConcept;
  530. using boost::concepts::MutableBidirectionalGraphConcept;
  531. using boost::concepts::MutableEdgeListGraphConcept;
  532. using boost::concepts::VertexMutablePropertyGraphConcept;
  533. using boost::concepts::EdgeMutablePropertyGraphConcept;
  534. using boost::concepts::AdjacencyMatrixConcept;
  535. using boost::concepts::ReadablePropertyGraphConcept;
  536. using boost::concepts::PropertyGraphConcept;
  537. using boost::concepts::LvaluePropertyGraphConcept;
  538. using boost::concepts::VertexIndexGraphConcept;
  539. using boost::concepts::EdgeIndexGraphConcept;
  540. // Utility concepts
  541. using boost::concepts::ColorValueConcept;
  542. using boost::concepts::BasicMatrixConcept;
  543. using boost::concepts::NumericValueConcept;
  544. using boost::concepts::DistanceMeasureConcept;
  545. using boost::concepts::DegreeMeasureConcept;
  546. } /* namespace boost */
  547. #include <boost/concept/detail/concept_undef.hpp>
  548. #endif /* BOOST_GRAPH_CONCEPTS_H */