stanford_graph.hpp 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586
  1. //=======================================================================
  2. // Copyright 1997-2001 University of Notre Dame.
  3. // Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
  4. //
  5. // Distributed under the Boost Software License, Version 1.0. (See
  6. // accompanying file LICENSE_1_0.txt or copy at
  7. // http://www.boost.org/LICENSE_1_0.txt)
  8. //=======================================================================
  9. #ifndef BOOST_GRAPH_SGB_GRAPH_HPP
  10. #define BOOST_GRAPH_SGB_GRAPH_HPP
  11. #include <boost/config.hpp>
  12. #include <boost/operators.hpp>
  13. #include <boost/property_map/property_map.hpp>
  14. #include <boost/graph/graph_traits.hpp>
  15. #include <boost/graph/properties.hpp>
  16. // Thanks to Andreas Scherer for numerous suggestions and fixes!
  17. // This file adapts a Stanford GraphBase (SGB) Graph pointer into a
  18. // VertexListGraph. Note that a graph adaptor class is not needed,
  19. // SGB's Graph* is used as is. The VertexListGraph concept is fulfilled by
  20. // defining the appropriate non-member functions for Graph*.
  21. //
  22. // The PROTOTYPES change file extensions to SGB must be applied so
  23. // that the SGB functions have real prototypes which are necessary for
  24. // the C++ compiler. To apply the PROTOTYPES extensions, before you do
  25. // "make tests install" for SGB do "ln -s PROTOTYPES/* ." to the SGB
  26. // root directory (or just copy all the files from the PROTOTYPES
  27. // directory to the SGB root directory).
  28. //
  29. extern "C"
  30. {
  31. // We include all global definitions for the general stuff
  32. // of The Stanford GraphBase and its various graph generator
  33. // functions by reading all SGB headerfiles as in section 2 of
  34. // the "test_sample" program.
  35. #include <gb_graph.h> /* SGB data structures */
  36. #include <gb_io.h> /* SGB input/output routines */
  37. #include <gb_flip.h> /* random number generator */
  38. #include <gb_dijk.h> /* routines for shortest paths */
  39. #include <gb_basic.h> /* the basic graph operations */
  40. #undef empty /* avoid name clash with C++ standard library */
  41. inline Graph* empty(long n) /* and provide workaround */
  42. {
  43. return board(n, 0L, 0L, 0L, 2L, 0L, 0L);
  44. }
  45. #include <gb_books.h> /* graphs based on literature */
  46. #include <gb_econ.h> /* graphs based on economic data */
  47. #include <gb_games.h> /* graphs based on football scores */
  48. #undef ap /* avoid name clash with BGL parameter */
  49. // ap ==> Vertex::u.I
  50. #include <gb_gates.h> /* graphs based on logic circuits */
  51. #undef val /* avoid name clash with g++ headerfile stl_tempbuf.h */
  52. // val ==> Vertex::x.I
  53. #include <gb_lisa.h> /* graphs based on Mona Lisa */
  54. #include <gb_miles.h> /* graphs based on mileage data */
  55. #include <gb_plane.h> /* planar graphs */
  56. #include <gb_raman.h> /* Ramanujan graphs */
  57. #include <gb_rand.h> /* random graphs */
  58. #include <gb_roget.h> /* graphs based on Roget's Thesaurus */
  59. #include <gb_save.h> /* we save results in ASCII format */
  60. #include <gb_words.h> /* five-letter-word graphs */
  61. #undef weight /* avoid name clash with BGL parameter */
  62. // weight ==> Vertex::u.I
  63. }
  64. namespace boost
  65. {
  66. class sgb_edge;
  67. }
  68. class sgb_out_edge_iterator;
  69. class sgb_adj_iterator;
  70. class sgb_vertex_iterator;
  71. namespace boost
  72. {
  73. typedef Graph* sgb_graph_ptr;
  74. typedef const Graph* sgb_const_graph_ptr;
  75. struct sgb_traversal_tag : public virtual vertex_list_graph_tag,
  76. public virtual incidence_graph_tag,
  77. public virtual adjacency_graph_tag
  78. {
  79. };
  80. template <> struct graph_traits< sgb_graph_ptr >
  81. {
  82. typedef Vertex* vertex_descriptor;
  83. typedef boost::sgb_edge edge_descriptor;
  84. typedef sgb_out_edge_iterator out_edge_iterator;
  85. typedef void in_edge_iterator;
  86. typedef sgb_adj_iterator adjacency_iterator;
  87. typedef sgb_vertex_iterator vertex_iterator;
  88. typedef void edge_iterator;
  89. typedef long vertices_size_type;
  90. typedef long edge_size_type;
  91. typedef long degree_size_type;
  92. typedef directed_tag directed_category;
  93. typedef sgb_traversal_tag traversal_category;
  94. typedef allow_parallel_edge_tag edge_parallel_category;
  95. /** Return a null descriptor */
  96. static vertex_descriptor null_vertex() { return NULL; }
  97. };
  98. template <> struct graph_traits< sgb_const_graph_ptr >
  99. {
  100. typedef Vertex* vertex_descriptor;
  101. typedef boost::sgb_edge edge_descriptor;
  102. typedef sgb_out_edge_iterator out_edge_iterator;
  103. typedef void in_edge_iterator;
  104. typedef sgb_adj_iterator adjacency_iterator;
  105. typedef sgb_vertex_iterator vertex_iterator;
  106. typedef void edge_iterator;
  107. typedef long vertices_size_type;
  108. typedef long edge_size_type;
  109. typedef long degree_size_type;
  110. typedef directed_tag directed_category;
  111. typedef sgb_traversal_tag traversal_category;
  112. typedef allow_parallel_edge_tag edge_parallel_category;
  113. /** Return a null descriptor */
  114. static vertex_descriptor null_vertex() { return NULL; }
  115. };
  116. }
  117. namespace boost
  118. {
  119. struct edge_length_t
  120. {
  121. typedef edge_property_tag kind;
  122. };
  123. // We could just use Arc* as the edge descriptor type, but
  124. // we want to add the source(e,g) function which requires
  125. // that we carry along a pointer to the source vertex.
  126. class sgb_edge
  127. {
  128. typedef sgb_edge self;
  129. public:
  130. sgb_edge() : _arc(0), _src(0) {}
  131. sgb_edge(Arc* a, Vertex* s) : _arc(a), _src(s) {}
  132. friend Vertex* source(self e, sgb_const_graph_ptr) { return e._src; }
  133. friend Vertex* target(self e, sgb_const_graph_ptr) { return e._arc->tip; }
  134. friend bool operator==(const self& a, const self& b)
  135. {
  136. return a._arc == b._arc;
  137. }
  138. friend bool operator!=(const self& a, const self& b)
  139. {
  140. return a._arc != b._arc;
  141. }
  142. #if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
  143. template < class Ref > friend class sgb_edge_length_map;
  144. template < class Tag, class Ref > friend class sgb_edge_util_map;
  145. friend long get(edge_length_t, const sgb_graph_ptr&, const sgb_edge& key);
  146. friend long get(
  147. edge_length_t, const sgb_const_graph_ptr&, const sgb_edge& key);
  148. friend void put(
  149. edge_length_t, sgb_graph_ptr&, const sgb_edge& key, long value);
  150. protected:
  151. #endif
  152. Arc* _arc;
  153. Vertex* _src;
  154. };
  155. } // namespace boost
  156. class sgb_out_edge_iterator
  157. : public boost::forward_iterator_helper< sgb_out_edge_iterator, boost::sgb_edge,
  158. std::ptrdiff_t, boost::sgb_edge*, boost::sgb_edge >
  159. {
  160. typedef sgb_out_edge_iterator self;
  161. public:
  162. sgb_out_edge_iterator() : _src(0), _arc(0) {}
  163. sgb_out_edge_iterator(Vertex* s, Arc* d) : _src(s), _arc(d) {}
  164. boost::sgb_edge operator*() { return boost::sgb_edge(_arc, _src); }
  165. self& operator++()
  166. {
  167. _arc = _arc->next;
  168. return *this;
  169. }
  170. friend bool operator==(const self& x, const self& y)
  171. {
  172. return x._arc == y._arc;
  173. }
  174. protected:
  175. Vertex* _src;
  176. Arc* _arc;
  177. };
  178. class sgb_adj_iterator
  179. : public boost::forward_iterator_helper< sgb_adj_iterator, Vertex*,
  180. std::ptrdiff_t, Vertex**, Vertex* >
  181. {
  182. typedef sgb_adj_iterator self;
  183. public:
  184. sgb_adj_iterator() : _arc(0) {}
  185. sgb_adj_iterator(Arc* d) : _arc(d) {}
  186. Vertex* operator*() { return _arc->tip; }
  187. self& operator++()
  188. {
  189. _arc = _arc->next;
  190. return *this;
  191. }
  192. friend bool operator==(const self& x, const self& y)
  193. {
  194. return x._arc == y._arc;
  195. }
  196. protected:
  197. Arc* _arc;
  198. };
  199. // The reason we have this instead of just using Vertex* is that we
  200. // want to use Vertex* as the vertex_descriptor instead of just
  201. // Vertex, which avoids problems with boost passing vertex descriptors
  202. // by value and how that interacts with the sgb_vertex_id_map.
  203. class sgb_vertex_iterator
  204. : public boost::forward_iterator_helper< sgb_vertex_iterator, Vertex*,
  205. std::ptrdiff_t, Vertex**, Vertex* >
  206. {
  207. typedef sgb_vertex_iterator self;
  208. public:
  209. sgb_vertex_iterator() : _v(0) {}
  210. sgb_vertex_iterator(Vertex* v) : _v(v) {}
  211. Vertex* operator*() { return _v; }
  212. self& operator++()
  213. {
  214. ++_v;
  215. return *this;
  216. }
  217. friend bool operator==(const self& x, const self& y)
  218. {
  219. return x._v == y._v;
  220. }
  221. protected:
  222. Vertex* _v;
  223. };
  224. namespace boost
  225. {
  226. inline std::pair< sgb_vertex_iterator, sgb_vertex_iterator > vertices(
  227. sgb_const_graph_ptr g)
  228. {
  229. return std::make_pair(sgb_vertex_iterator(g->vertices),
  230. sgb_vertex_iterator(g->vertices + g->n));
  231. }
  232. inline std::pair< sgb_out_edge_iterator, sgb_out_edge_iterator > out_edges(
  233. Vertex* u, sgb_const_graph_ptr)
  234. {
  235. return std::make_pair(
  236. sgb_out_edge_iterator(u, u->arcs), sgb_out_edge_iterator(u, 0));
  237. }
  238. inline boost::graph_traits< sgb_graph_ptr >::degree_size_type out_degree(
  239. Vertex* u, sgb_const_graph_ptr g)
  240. {
  241. boost::graph_traits< sgb_graph_ptr >::out_edge_iterator i, i_end;
  242. boost::tie(i, i_end) = out_edges(u, g);
  243. return std::distance(i, i_end);
  244. }
  245. // in_edges?
  246. inline std::pair< sgb_adj_iterator, sgb_adj_iterator > adjacent_vertices(
  247. Vertex* u, sgb_const_graph_ptr)
  248. {
  249. return std::make_pair(sgb_adj_iterator(u->arcs), sgb_adj_iterator(0));
  250. }
  251. inline long num_vertices(sgb_const_graph_ptr g) { return g->n; }
  252. inline long num_edges(sgb_const_graph_ptr g) { return g->m; }
  253. inline Vertex* vertex(long v, sgb_const_graph_ptr g) { return g->vertices + v; }
  254. // Various Property Maps
  255. // Vertex ID
  256. class sgb_vertex_id_map
  257. : public boost::put_get_helper< long, sgb_vertex_id_map >
  258. {
  259. public:
  260. typedef boost::readable_property_map_tag category;
  261. typedef long value_type;
  262. typedef long reference;
  263. typedef Vertex* key_type;
  264. sgb_vertex_id_map() : _g(0) {}
  265. sgb_vertex_id_map(sgb_graph_ptr g) : _g(g) {}
  266. long operator[](Vertex* v) const { return v - _g->vertices; }
  267. protected:
  268. sgb_graph_ptr _g;
  269. };
  270. inline sgb_vertex_id_map get(vertex_index_t, sgb_graph_ptr g)
  271. {
  272. return sgb_vertex_id_map(g);
  273. }
  274. // Vertex Name
  275. class sgb_vertex_name_map
  276. : public boost::put_get_helper< char*, sgb_vertex_name_map >
  277. {
  278. public:
  279. typedef boost::readable_property_map_tag category;
  280. typedef char* value_type;
  281. typedef char* reference;
  282. typedef Vertex* key_type;
  283. char* operator[](Vertex* v) const { return v->name; }
  284. };
  285. inline sgb_vertex_name_map get(vertex_name_t, sgb_graph_ptr)
  286. {
  287. return sgb_vertex_name_map();
  288. }
  289. // Vertex Property Tags
  290. #define SGB_PROPERTY_TAG(KIND, TAG) \
  291. template < class T > struct TAG##_property \
  292. { \
  293. typedef KIND##_property_tag kind; \
  294. typedef T type; \
  295. };
  296. SGB_PROPERTY_TAG(vertex, u)
  297. SGB_PROPERTY_TAG(vertex, v)
  298. SGB_PROPERTY_TAG(vertex, w)
  299. SGB_PROPERTY_TAG(vertex, x)
  300. SGB_PROPERTY_TAG(vertex, y)
  301. SGB_PROPERTY_TAG(vertex, z)
  302. // Edge Property Tags
  303. SGB_PROPERTY_TAG(edge, a)
  304. SGB_PROPERTY_TAG(edge, b)
  305. // Various Utility Maps
  306. // helpers
  307. inline Vertex*& get_util(util& u, Vertex*) { return u.V; }
  308. inline Arc*& get_util(util& u, Arc*) { return u.A; }
  309. inline sgb_graph_ptr& get_util(util& u, sgb_graph_ptr) { return u.G; }
  310. inline char*& get_util(util& u, char*) { return u.S; }
  311. inline long& get_util(util& u, long) { return u.I; }
  312. #define SGB_GET_UTIL_FIELD(KIND, X) \
  313. template < class T > inline T& get_util_field(KIND* k, X##_property< T >) \
  314. { \
  315. return get_util(k->X, T()); \
  316. }
  317. SGB_GET_UTIL_FIELD(Vertex, u)
  318. SGB_GET_UTIL_FIELD(Vertex, v)
  319. SGB_GET_UTIL_FIELD(Vertex, w)
  320. SGB_GET_UTIL_FIELD(Vertex, x)
  321. SGB_GET_UTIL_FIELD(Vertex, y)
  322. SGB_GET_UTIL_FIELD(Vertex, z)
  323. SGB_GET_UTIL_FIELD(Arc, a)
  324. SGB_GET_UTIL_FIELD(Arc, b)
  325. // Vertex Utility Map
  326. template < class Tag, class Ref >
  327. class sgb_vertex_util_map
  328. : public boost::put_get_helper< Ref, sgb_vertex_util_map< Tag, Ref > >
  329. {
  330. Tag tag;
  331. public:
  332. explicit sgb_vertex_util_map(Tag tag = Tag()) : tag(tag) {}
  333. typedef boost::lvalue_property_map_tag category;
  334. typedef typename Tag::type value_type;
  335. typedef Vertex* key_type;
  336. typedef Ref reference;
  337. reference operator[](Vertex* v) const { return get_util_field(v, tag); }
  338. };
  339. // Edge Utility Map
  340. template < class Tag, class Ref >
  341. class sgb_edge_util_map
  342. : public boost::put_get_helper< Ref, sgb_edge_util_map< Tag, Ref > >
  343. {
  344. Tag tag;
  345. public:
  346. explicit sgb_edge_util_map(Tag tag = Tag()) : tag(tag) {}
  347. typedef boost::lvalue_property_map_tag category;
  348. typedef typename Tag::type value_type;
  349. typedef Vertex* key_type;
  350. typedef Ref reference;
  351. reference operator[](const sgb_edge& e) const
  352. {
  353. return get_util_field(e._arc, tag);
  354. }
  355. };
  356. template < class Tag >
  357. inline sgb_vertex_util_map< Tag, const typename Tag::type& > get_property_map(
  358. Tag, const sgb_graph_ptr& g, vertex_property_tag)
  359. {
  360. return sgb_vertex_util_map< Tag, const typename Tag::type& >();
  361. }
  362. template < class Tag >
  363. inline sgb_vertex_util_map< Tag, typename Tag::type& > get_property_map(
  364. Tag, sgb_graph_ptr& g, vertex_property_tag)
  365. {
  366. return sgb_vertex_util_map< Tag, typename Tag::type& >();
  367. }
  368. template < class Tag >
  369. inline sgb_edge_util_map< Tag, const typename Tag::type& > get_property_map(
  370. Tag, const sgb_graph_ptr& g, edge_property_tag)
  371. {
  372. return sgb_edge_util_map< Tag, const typename Tag::type& >();
  373. }
  374. template < class Tag >
  375. inline sgb_edge_util_map< Tag, typename Tag::type& > get_property_map(
  376. Tag, sgb_graph_ptr& g, edge_property_tag)
  377. {
  378. return sgb_edge_util_map< Tag, typename Tag::type& >();
  379. }
  380. // Edge Length Access
  381. template < class Ref >
  382. class sgb_edge_length_map
  383. : public boost::put_get_helper< Ref, sgb_edge_length_map< Ref > >
  384. {
  385. public:
  386. typedef boost::lvalue_property_map_tag category;
  387. typedef long value_type;
  388. typedef sgb_edge key_type;
  389. typedef Ref reference;
  390. reference operator[](const sgb_edge& e) const { return e._arc->len; }
  391. };
  392. inline sgb_edge_length_map< const long& > get(
  393. edge_length_t, const sgb_graph_ptr&)
  394. {
  395. return sgb_edge_length_map< const long& >();
  396. }
  397. inline sgb_edge_length_map< const long& > get(
  398. edge_length_t, const sgb_const_graph_ptr&)
  399. {
  400. return sgb_edge_length_map< const long& >();
  401. }
  402. inline sgb_edge_length_map< long& > get(edge_length_t, sgb_graph_ptr&)
  403. {
  404. return sgb_edge_length_map< long& >();
  405. }
  406. inline long get(edge_length_t, const sgb_graph_ptr&, const sgb_edge& key)
  407. {
  408. return key._arc->len;
  409. }
  410. inline long get(edge_length_t, const sgb_const_graph_ptr&, const sgb_edge& key)
  411. {
  412. return key._arc->len;
  413. }
  414. inline void put(edge_length_t, sgb_graph_ptr&, const sgb_edge& key, long value)
  415. {
  416. key._arc->len = value;
  417. }
  418. // Property Map Traits Classes
  419. template <> struct property_map< sgb_graph_ptr, edge_length_t >
  420. {
  421. typedef sgb_edge_length_map< long& > type;
  422. typedef sgb_edge_length_map< const long& > const_type;
  423. };
  424. template <> struct property_map< sgb_graph_ptr, vertex_index_t >
  425. {
  426. typedef sgb_vertex_id_map type;
  427. typedef sgb_vertex_id_map const_type;
  428. };
  429. template <> struct property_map< sgb_graph_ptr, vertex_name_t >
  430. {
  431. typedef sgb_vertex_name_map type;
  432. typedef sgb_vertex_name_map const_type;
  433. };
  434. template <> struct property_map< sgb_const_graph_ptr, edge_length_t >
  435. {
  436. typedef sgb_edge_length_map< const long& > const_type;
  437. };
  438. template <> struct property_map< sgb_const_graph_ptr, vertex_index_t >
  439. {
  440. typedef sgb_vertex_id_map const_type;
  441. };
  442. template <> struct property_map< sgb_const_graph_ptr, vertex_name_t >
  443. {
  444. typedef sgb_vertex_name_map const_type;
  445. };
  446. namespace detail
  447. {
  448. template < class Kind, class PropertyTag > struct sgb_choose_property_map
  449. {
  450. };
  451. template < class PropertyTag >
  452. struct sgb_choose_property_map< vertex_property_tag, PropertyTag >
  453. {
  454. typedef typename PropertyTag::type value_type;
  455. typedef sgb_vertex_util_map< PropertyTag, value_type& > type;
  456. typedef sgb_vertex_util_map< PropertyTag, const value_type& >
  457. const_type;
  458. };
  459. template < class PropertyTag >
  460. struct sgb_choose_property_map< edge_property_tag, PropertyTag >
  461. {
  462. typedef typename PropertyTag::type value_type;
  463. typedef sgb_edge_util_map< PropertyTag, value_type& > type;
  464. typedef sgb_edge_util_map< PropertyTag, const value_type& > const_type;
  465. };
  466. } // namespace detail
  467. template < class PropertyTag > struct property_map< sgb_graph_ptr, PropertyTag >
  468. {
  469. typedef typename property_kind< PropertyTag >::type Kind;
  470. typedef detail::sgb_choose_property_map< Kind, PropertyTag > Choice;
  471. typedef typename Choice::type type;
  472. typedef typename Choice::const_type const_type;
  473. };
  474. template < class PropertyTag >
  475. struct property_map< sgb_const_graph_ptr, PropertyTag >
  476. {
  477. typedef typename property_kind< PropertyTag >::type Kind;
  478. typedef detail::sgb_choose_property_map< Kind, PropertyTag > Choice;
  479. typedef typename Choice::const_type const_type;
  480. };
  481. #define SGB_UTIL_ACCESSOR(KIND, X) \
  482. template < class T > \
  483. inline sgb_##KIND##_util_map< X##_property< T >, T& > get( \
  484. X##_property< T >, sgb_graph_ptr&) \
  485. { \
  486. return sgb_##KIND##_util_map< X##_property< T >, T& >(); \
  487. } \
  488. template < class T > \
  489. inline sgb_##KIND##_util_map< X##_property< T >, const T& > get( \
  490. X##_property< T >, const sgb_graph_ptr&) \
  491. { \
  492. return sgb_##KIND##_util_map< X##_property< T >, const T& >(); \
  493. } \
  494. template < class T > \
  495. inline sgb_##KIND##_util_map< X##_property< T >, const T& > get( \
  496. X##_property< T >, const sgb_const_graph_ptr&) \
  497. { \
  498. return sgb_##KIND##_util_map< X##_property< T >, const T& >(); \
  499. } \
  500. template < class T, class Key > \
  501. inline typename sgb_##KIND##_util_map< X##_property< T >, \
  502. const T& >::value_type \
  503. get(X##_property< T >, const sgb_graph_ptr&, const Key& key) \
  504. { \
  505. return sgb_##KIND##_util_map< X##_property< T >, const T& >()[key]; \
  506. } \
  507. template < class T, class Key > \
  508. inline typename sgb_##KIND##_util_map< X##_property< T >, \
  509. const T& >::value_type \
  510. get(X##_property< T >, const sgb_const_graph_ptr&, const Key& key) \
  511. { \
  512. return sgb_##KIND##_util_map< X##_property< T >, const T& >()[key]; \
  513. } \
  514. template < class T, class Key, class Value > \
  515. inline void put( \
  516. X##_property< T >, sgb_graph_ptr&, const Key& key, const Value& value) \
  517. { \
  518. sgb_##KIND##_util_map< X##_property< T >, T& >()[key] = value; \
  519. }
  520. SGB_UTIL_ACCESSOR(vertex, u)
  521. SGB_UTIL_ACCESSOR(vertex, v)
  522. SGB_UTIL_ACCESSOR(vertex, w)
  523. SGB_UTIL_ACCESSOR(vertex, x)
  524. SGB_UTIL_ACCESSOR(vertex, y)
  525. SGB_UTIL_ACCESSOR(vertex, z)
  526. SGB_UTIL_ACCESSOR(edge, a)
  527. SGB_UTIL_ACCESSOR(edge, b)
  528. } // namespace boost
  529. #endif // BOOST_GRAPH_SGB_GRAPH_HPP