3 Copyright (c) 2004 Kris Beevers
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: AStarVisitor
</Title>
11 <BODY BGCOLOR=
"#ffffff" LINK=
"#0000ee" TEXT=
"#000000" VLINK=
"#551a8b"
13 <IMG SRC=
"../../../boost.png"
14 ALT=
"C++ Boost" width=
"277" height=
"86">
18 <H1>AStar Visitor Concept
</H1>
20 This concept defines the visitor interface for
<a
21 href=
"./astar_search.html"><tt>astar_search()
</tt></a>. Users can
22 define a class with the AStar Visitor interface and pass an object of
23 the class to
<tt>astar_search()
</tt>, thereby augmenting the actions
24 taken during the graph search.
26 <h3>Refinement of
</h3>
28 <a href=
"../../utility/CopyConstructible.html">Copy Constructible
</a>
29 (copying a visitor should be a lightweight operation).
37 <TD>A type that is a model of AStar Visitor.
</TD>
42 <TD>An object of type
<tt>V
</tt>.
</TD>
47 <TD>A type that is a model of Graph.
</TD>
52 <TD>An object of type
<tt>const G
&</tt>.
</TD>
57 <TD>An object of type
<tt>boost::graph_traits
<G
>::edge_descriptor
</tt>.
</TD>
61 <TD><tt>s,u,v
</tt></TD>
62 <TD>An object of type
<tt>boost::graph_traits
<G
>::vertex_descriptor
</tt>.
</TD>
67 <TD>An object of type
<tt>DistanceMap
</tt>.
</TD>
71 <TD><tt>WeightMap
</tt></TD>
72 <TD>A type that is a model of
<a
73 href=
"../../property_map/doc/ReadablePropertyMap.html">Readable Property
79 <TD>An object of type
<tt>WeightMap
</tt>.
</TD>
84 <h3>Associated Types
</h3>
89 <h3>Valid Expressions
</h3>
93 <th>Name
</th><th>Expression
</th><th>Return Type
</th><th>Description
</th>
97 <td>Initialize Vertex
</td>
98 <td><tt>vis.initialize_vertex(u, g)
</tt></td>
99 <td><tt>void
</tt></td>
101 This is invoked on each vertex of the graph when it is first
102 initialized (i.e., when its property maps are initialized).
107 <td>Discover Vertex
</td>
108 <td><tt>vis.discover_vertex(u, g)
</tt></td>
109 <td><tt>void
</tt></td>
111 This is invoked when a vertex is first discovered and is added to the
117 <td>Examine Vertex
</td>
118 <td><tt>vis.examine_vertex(u, g)
</tt></td>
119 <td><tt>void
</tt></td>
121 This is invoked on a vertex as it is popped from the queue (i.e., it
122 has the lowest cost on the OPEN list). This happens immediately before
123 <tt>examine_edge()
</tt> is invoked on each of the out-edges of vertex
129 <td>Examine Edge
</td>
130 <td><tt>vis.examine_edge(e, g)
</tt></td>
131 <td><tt>void
</tt></td>
133 This is invoked on every out-edge of each vertex after it is
140 <td>Edge Relaxed
</td>
141 <td><tt>vis.edge_relaxed(e, g)
</tt></td>
142 <td><tt>void
</tt></td>
144 Upon examination, if the following condition holds then the edge is
145 relaxed (the distance of its target vertex is reduced) and this method
149 tie(u, s) = incident(e, g);
150 D d_u = get(d, u), d_v = get(d, s);
152 assert(compare(combine(d_u, w_e), d_s));
159 <td>Edge Not Relaxed
</td>
160 <td><tt>vis.edge_not_relaxed(e, g)
</tt></td>
161 <td><tt>void
</tt></td>
163 Upon examination, if an edge is not relaxed (see above) then this
169 <td>Black Target
</td>
170 <td><tt>vis.black_target(e, g)
</tt></td>
171 <td><tt>void
</tt></td>
173 This is invoked when a vertex that is on the CLOSED list is
174 ``rediscovered'' via a more efficient path and is re-added to the
180 <td>Finish Vertex
</td>
181 <td><tt>vis.finish_vertex(u, g)
</tt></td>
182 <td><tt>void
</tt></td>
184 This is invoked on a vertex when it is added to the CLOSED list. This
185 happens after all of its out-edges have been examined.
194 <li><a href=
"./astar_visitor.html"><tt>astar_visitor
</tt></a>
200 <a href=
"./visitor_concepts.html">Visitor concepts
</a>
206 <TD nowrap
>Copyright
© 2004</TD><TD>
207 <A HREF=
"http://www.cs.rpi.edu/~beevek/">Kristopher Beevers
</A>,
208 Rensselaer Polytechnic Institute (
<A
209 HREF=
"mailto:beevek@cs.rpi.edu">beevek@cs.rpi.edu
</A>)