3 Copyright (c) Jeremy Siek, Lie-Quan Lee, and Andrew Lumsdaine 2000
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)
10 <Title>Boost Graph Library: bfs_visitor
</Title>
11 <BODY BGCOLOR=
"#ffffff" LINK=
"#0000ee" TEXT=
"#000000" VLINK=
"#551a8b"
13 <IMG SRC=
"../../../boost.png"
14 ALT=
"C++ Boost" width=
"277" height=
"86">
20 bfs_visitor
<EventVisitorList
>
24 This class is an adapter that converts a list of
<a
25 href=
"./EventVisitor.html">EventVisitor
</a>s (constructed using
26 <tt>std::pair
</tt>) into a
<a href=
"./BFSVisitor.html">BFSVisitor
</a>.
31 This is an excerpt from
<a
32 href=
"../example/bfs.cpp"><tt>examples/bfs.cpp
</tt></a> where three
33 event-visitors are combined to make a BFS visitor. The functions
34 <tt>boost::record_distances
</tt>,
<tt>boost::record_predecessors
</tt>,
35 and
<tt>copy_graph
</tt> are all functions that create an event
39 // Construct graph G and obtain the source vertex s ...
41 boost::breadth_first_search(G, s,
42 boost::make_bfs_visitor(
43 std::make_pair(boost::record_distances(d, boost::on_tree_edge()),
44 std::make_pair(boost::record_predecessors(p.begin(),
45 boost::on_tree_edge()),
46 copy_graph(G_copy, boost::on_examine_edge())))) );
52 <a href=
"./BFSVisitor.html">BFSVisitor
</a>
54 <H3>Template Parameters
</H3>
59 <th>Parameter
</th><th>Description
</th><th>Default
</th>
62 <TR><TD><TT>EventVisitorList
</TT></TD>
64 A list of
<a href=
"./EventVisitor.html">EventVisitor
</a>'s created
65 with
<tt>std::pair
</tt>.
67 <TD><a href=
"./null_visitor.html"><tt>null_visitor
</tt></a></TD>
72 <H3>Where Defined
</H3>
75 <a href=
"../../../boost/graph/breadth_first_search.hpp">
76 <TT>boost/graph/breadth_first_search.hpp
</TT></a>
78 <h3>Member Functions
</h3>
80 This class implements all of the member functions required by
<a
81 href=
"./BFSVisitor.html">BFSVisitor
</a>. In each function the
82 appropriate event is dispatched to the
<a
83 href=
"./EventVisitor.html">EventVisitor
</a> in the EventVisitorList.
85 <h3>Non-Member Functions
</h3>
89 <th>Function
</th><th>Description
</th>
93 template
<class EventVisitorList
><br>
94 bfs_visitor
<EventVisitorList
><br>
95 make_bfs_visitor(EventVisitorList ev_list);
97 Returns the event visitor list adapted to be a BFS visitor.
104 <a href=
"./visitor_concepts.html">Visitor concepts
</a>
106 The following are event visitors:
<a
107 href=
"./predecessor_recorder.html"><tt>predecessor_recorder
</tt></a>,
108 <a href=
"./distance_recorder.html"><tt>distance_recorder
</tt></a>,
109 <a href=
"./time_stamper.html"><tt>time_stamper
</tt></a>,
110 and
<a href=
"./property_writer.html"><tt>property_writer
</tt></a>.
117 <TD nowrap
>Copyright
© 2000-
2001</TD><TD>
118 <A HREF=
"http://www.boost.org/people/jeremy_siek.htm">Jeremy Siek
</A>,
119 Indiana University (
<A
120 HREF=
"mailto:jsiek@osl.iu.edu">jsiek@osl.iu.edu
</A>)
<br>
121 <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>
122 <A HREF=
"http://www.osl.iu.edu/~lums">Andrew Lumsdaine
</A>,
123 Indiana University (
<A
124 HREF=
"mailto:lums@osl.iu.edu">lums@osl.iu.edu
</A>)