dijkstra_visitor.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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: dijkstra_visitor</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>
  16. <pre>
  17. dijkstra_visitor&lt;EventVisitorList&gt;
  18. </pre>
  19. </H1>
  20. This class is an adapter that converts a list of <a
  21. href="./EventVisitor.html">EventVisitor</a>s (constructed using
  22. <tt>std::pair</tt>) into a <a
  23. href="./DijkstraVisitor.html">DijkstraVisitor</a>.
  24. <h3>Example</h3>
  25. This is an excerpt from <a
  26. href="../example/dave.cpp"><tt>examples/dave.cpp</tt></a>
  27. where the <tt>copy_graph</tt> single-event visitor
  28. is used to create a copy the shortest-paths search-tree calculated
  29. by Dijkstra's algorithm.
  30. <pre>
  31. boost::dijkstra_shortest_paths
  32. (G, vertex(a, G),
  33. distance_map(make_iterator_property_map(distance.begin(), vertex_id, distance[0])).
  34. predecessor_map(make_iterator_property_map(parent.begin(), vertex_id, parent[0])).
  35. visitor(make_dijkstra_visitor(copy_graph(G_copy, on_examine_edge()))));
  36. </pre>
  37. <h3>Model of</h3>
  38. <a href="./DijkstraVisitor.html">Dijkstra Visitor</a>
  39. <H3>Template Parameters</H3>
  40. <P>
  41. <TABLE border>
  42. <TR>
  43. <th>Parameter</th><th>Description</th><th>Default</th>
  44. </tr>
  45. <TR><TD><TT>EventVisitorList</TT></TD>
  46. <TD>
  47. A list of <a href="./EventVisitor.html">EventVisitor</a>'s created
  48. with <tt>std::pair</tt>.
  49. </TD>
  50. <TD><TT><a href="./null_visitor.html"><tt>null_visitor</tt></a></TT></TD>
  51. </TR>
  52. </table>
  53. <H3>Where Defined</H3>
  54. <P>
  55. <a href="../../../boost/graph/dijkstra_shortest_paths.hpp">
  56. <TT>boost/graph/dijkstra_shortest_paths.hpp</TT></a>
  57. <h3>Member Functions</h3>
  58. This class implements all of the member functions required by <a
  59. href="./DijkstraVisitor.html">DijkstraVisitor</a>. In each
  60. function the appropriate event is dispatched to the <a
  61. href="./EventVisitor.html">EventVisitor</a> in the EventVisitorList.
  62. <h3>Non-Member Functions</h3>
  63. <table border>
  64. <tr>
  65. <th>Function</th><th>Description</th>
  66. </tr>
  67. <tr><td><tt>
  68. template &lt;class EventVisitorList&gt;<br>
  69. dijkstra_visitor&lt;EventVisitorList&gt;<br>
  70. make_dijkstra_visitor(EventVisitorList ev_list);
  71. </tt></td><td>
  72. Returns the event visitor list adapted to be a Dijkstra Visitor.
  73. </td></tr>
  74. </table>
  75. <h3>See Also</h3>
  76. <a href="./visitor_concepts.html">Visitor concepts</a>
  77. <p>
  78. The following are event visitors: <a
  79. href="./predecessor_recorder.html"><tt>predecessor_recorder</tt></a>,
  80. <a href="./distance_recorder.html"><tt>distance_recorder</tt></a>
  81. <a href="./time_stamper.html"><tt>time_stamper</tt></a>,
  82. and <a href="./property_writer.html"><tt>property_writer</tt></a>.
  83. <br>
  84. <HR>
  85. <TABLE>
  86. <TR valign=top>
  87. <TD nowrap>Copyright &copy; 2000-2001</TD><TD>
  88. <A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
  89. Indiana University (<A
  90. HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
  91. <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>
  92. <A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
  93. Indiana University (<A
  94. HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
  95. </TD></TR></TABLE>
  96. </BODY>
  97. </HTML>