adjacency_list_traits.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <HTML>
  2. <!--
  3. Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
  4. Distributed under the Boost Software License, Version 1.0.
  5. (See accompanying file LICENSE_1_0.txt or copy at
  6. http://www.boost.org/LICENSE_1_0.txt)
  7. -->
  8. <Head>
  9. <Title>Boost Graph Library: Graph Traits</Title>
  10. <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b"
  11. ALINK="#ff0000">
  12. <IMG SRC="../../../boost.png"
  13. ALT="C++ Boost" width="277" height="86">
  14. <BR Clear>
  15. <H1><A NAME=""></A>
  16. <pre>
  17. adjacency_list_traits&lt;EdgeList, VertexList, Directed&gt;
  18. </pre>
  19. </H1>
  20. This class provides an alternate method for accessing some of the
  21. associated types of the <tt>adjacency_list</tt> class. The main reason
  22. for this class is that sometimes one would like to create graph
  23. properties whose values are vertex or edge descriptors. If you try to
  24. use <tt>graph_traits</tt> for this you will run into a problem with
  25. mutually recursive types. To get around this problem, the
  26. <tt>adjacency_list_traits</tt> class is provided, which gives the user
  27. access to the vertex and edge descriptor types without requiring the
  28. user to provide the property types for the graph.
  29. <pre>
  30. template &lt;class EdgeList, class VertexList, class Directed&gt;
  31. struct adjacency_list_traits {
  32. typedef ... vertex_descriptor;
  33. typedef ... edge_descriptor;
  34. typedef ... directed_category;
  35. typedef ... edge_parallel_category;
  36. };
  37. </pre>
  38. <h3>Where Defined</h3>
  39. <a href="../../../boost/graph/adjacency_list.hpp"><tt>boost/graph/adjacency_list.hpp</tt></a>
  40. <H3>Template Parameters</H3>
  41. <P>
  42. <TABLE border>
  43. <TR>
  44. <th>Parameter</th><th>Description</th><th>Default</th>
  45. </tr>
  46. <TR><TD><TT>EdgeList</TT></TD>
  47. <TD>
  48. The selector type for the edge container implementation.
  49. </TD>
  50. <td><tt>vecS</tt></td>
  51. </TR>
  52. <TR><TD><TT>VertexList</TT></TD>
  53. <TD>
  54. The selector type for the vertex container implementation.
  55. </TD>
  56. <td><tt>vecS</tt></td>
  57. </TR>
  58. <TR><TD><TT>Directed</TT></TD>
  59. <TD>
  60. The selector type whether the graph is directed or undirected.
  61. </TD>
  62. <td><tt>directedS</tt></td>
  63. </TR>
  64. </table>
  65. <h3>Model of</h3>
  66. <a
  67. href="http://www.boost.org/sgi/stl/DefaultConstructible.html">DefaultConstructible</a> and
  68. <a href="http://www.boost.org/sgi/stl/Assignable.html">Assignable</a>
  69. <h3>Type Requirements</h3>
  70. Under construction.
  71. <H2>Members</H2>
  72. <p>
  73. <table border>
  74. <tr>
  75. <th>Member</th><th>Description</th>
  76. </tr>
  77. <tr>
  78. <td><tt>
  79. vertex_descriptor
  80. </tt></td>
  81. <td>
  82. The type for the objects used to identify vertices in the graph.
  83. </td>
  84. </tr>
  85. <tr>
  86. <td><tt>
  87. edge_descriptor
  88. </tt></td>
  89. <td>
  90. The type for the objects used to identify edges in the graph.
  91. </td>
  92. </tr>
  93. <tr>
  94. <td><tt>
  95. directed_category
  96. </tt></td>
  97. <td>
  98. This says whether the graph is undirected (<tt>undirected_tag</tt>)
  99. or directed (<tt>directed_tag</tt>).
  100. </td>
  101. </tr>
  102. <tr>
  103. <td><tt>
  104. edge_parallel_category
  105. </tt></td>
  106. <td>
  107. This says whether the graph allows parallel edges to be inserted
  108. (<tt>allow_parallel_edge_tag</tt>) or if it automatically removes
  109. parallel edges (<tt>disallow_parallel_edge_tag</tt>).
  110. </td>
  111. </tr>
  112. </table>
  113. <h3>See Also</h3>
  114. <a href="./adjacency_list.html"><tt>adjacency_list</tt></a>
  115. <br>
  116. <HR>
  117. <TABLE>
  118. <TR valign=top>
  119. <TD nowrap>Copyright &copy; 2000-2001</TD><TD>
  120. <A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
  121. Indiana University (<A
  122. HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
  123. <A HREF="http://www.boost.org/people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br>
  124. <A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
  125. Indiana University (<A
  126. HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
  127. </TD></TR></TABLE>
  128. </BODY>
  129. </HTML>