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