graph_concepts.hpp 21 KB

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