| 1 | <HTML> |
|---|
| 2 | <!-- |
|---|
| 3 | -- Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000 |
|---|
| 4 | -- |
|---|
| 5 | -- Distributed under the Boost Software License, Version 1.0. |
|---|
| 6 | -- (See accompanying file LICENSE_1_0.txt or copy at |
|---|
| 7 | -- http://www.boost.org/LICENSE_1_0.txt) |
|---|
| 8 | --> |
|---|
| 9 | <Head> |
|---|
| 10 | <Title>Boost Graph Library: Visitor Concepts</Title> |
|---|
| 11 | <BODY BGCOLOR="#ffffff" LINK="#0000ee" TEXT="#000000" VLINK="#551a8b" |
|---|
| 12 | ALINK="#ff0000"> |
|---|
| 13 | <IMG SRC="../../../boost.png" |
|---|
| 14 | ALT="C++ Boost" width="277" height="86"> |
|---|
| 15 | |
|---|
| 16 | <BR Clear> |
|---|
| 17 | |
|---|
| 18 | <H1><A NAME="sec:visitor-concepts"></A> |
|---|
| 19 | Visitor Concepts |
|---|
| 20 | </H1> |
|---|
| 21 | |
|---|
| 22 | <P> |
|---|
| 23 | The visitor concepts plays the same role in BGL as <a |
|---|
| 24 | href="http://www.sgi.com/tech/stl/functors.html">functors</a> |
|---|
| 25 | play in the STL. Functors provide a mechanism for extending an |
|---|
| 26 | algorithm; for customizing what is done at each step of the algorithm. |
|---|
| 27 | Visitors allow the user to insert their own operations at various |
|---|
| 28 | steps within a graph algorithm. Unlike the STL algorithms, graph |
|---|
| 29 | algorithms typically have multiple event points where one may want to |
|---|
| 30 | insert a call-back via a functor. Therefore visitors do not have a |
|---|
| 31 | single <tt>operator()</tt> method like a functor, but instead have |
|---|
| 32 | several methods that correspond to the various event points. Each |
|---|
| 33 | algorithm has a different set of event points, which are described by |
|---|
| 34 | the following visitor concepts: |
|---|
| 35 | |
|---|
| 36 | <ul> |
|---|
| 37 | <li> <a href="./BFSVisitor.html">BFS Visitor</a> |
|---|
| 38 | <li> <a href="./DFSVisitor.html">DFS Visitor</a> |
|---|
| 39 | <li> <a href="./DijkstraVisitor.html">Dijkstra Visitor</a> |
|---|
| 40 | <li> <a href="./BellmanFordVisitor.html">Bellman Ford Visitor</a> |
|---|
| 41 | <li> <a href="./AStarVisitor.html">A* Visitor</a> |
|---|
| 42 | <li> <a href="./EventVisitor.html">Event Visitor</a> |
|---|
| 43 | </ul> |
|---|
| 44 | |
|---|
| 45 | |
|---|
| 46 | <br> |
|---|
| 47 | <HR> |
|---|
| 48 | <TABLE> |
|---|
| 49 | <TR valign=top> |
|---|
| 50 | <TD nowrap>Copyright © 2000-2001</TD><TD> |
|---|
| 51 | <A HREF="../../../people/jeremy_siek.htm">Jeremy Siek</A>, |
|---|
| 52 | Indiana University (<A |
|---|
| 53 | HREF="mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu</A>)<br> |
|---|
| 54 | <A HREF="../../../people/liequan_lee.htm">Lie-Quan Lee</A>, Indiana University (<A HREF="mailto:llee@cs.indiana.edu">llee@cs.indiana.edu</A>)<br> |
|---|
| 55 | <A HREF=http://www.osl.iu.edu/~lums>Andrew Lumsdaine</A>, |
|---|
| 56 | Indiana University (<A |
|---|
| 57 | HREF="mailto:lums@osl.iu.edu">lums@osl.iu.edu</A>) |
|---|
| 58 | </TD></TR></TABLE> |
|---|
| 59 | |
|---|
| 60 | </BODY> |
|---|
| 61 | </HTML> |
|---|