visitor_concepts.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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: Visitor Concepts</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="sec:visitor-concepts"></A>
  16. Visitor Concepts
  17. </H1>
  18. <P>
  19. The visitor concepts plays the same role in BGL as <a
  20. href="http://www.boost.org/sgi/stl/functors.html">functors</a>
  21. play in the STL. Functors provide a mechanism for extending an
  22. algorithm; for customizing what is done at each step of the algorithm.
  23. Visitors allow the user to insert their own operations at various
  24. steps within a graph algorithm. Unlike the STL algorithms, graph
  25. algorithms typically have multiple event points where one may want to
  26. insert a call-back via a functor. Therefore visitors do not have a
  27. single <tt>operator()</tt> method like a functor, but instead have
  28. several methods that correspond to the various event points. Each
  29. algorithm has a different set of event points, which are described by
  30. the following visitor concepts:
  31. <ul>
  32. <li> <a href="./BFSVisitor.html">BFS Visitor</a>
  33. <li> <a href="./DFSVisitor.html">DFS Visitor</a>
  34. <li> <a href="./DijkstraVisitor.html">Dijkstra Visitor</a>
  35. <li> <a href="./BellmanFordVisitor.html">Bellman Ford Visitor</a>
  36. <li> <a href="./AStarVisitor.html">A* Visitor</a>
  37. <li> <a href="./EventVisitor.html">Event Visitor</a>
  38. <li> <a href="./PlanarFaceVisitor.html">Planar Face Visitor</a>
  39. <li> <a href="./TSPTourVisitor.html">TSP Tour Visitor</a>
  40. </ul>
  41. <br>
  42. <HR>
  43. <TABLE>
  44. <TR valign=top>
  45. <TD nowrap>Copyright &copy; 2000-2001</TD><TD>
  46. <A HREF="http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek</A>,
  47. Indiana University (<A
  48. HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br>
  49. <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>
  50. <A HREF="https://homes.cs.washington.edu/~al75">Andrew Lumsdaine</A>,
  51. Indiana University (<A
  52. HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>)
  53. </TD></TR></TABLE>
  54. </BODY>
  55. </HTML>