dijkstra_visitor<EventVisitorList>
This class is an adapter that converts a list of EventVisitor's (constructed using std::pair) into a DijkstraVisitor.
The code snippet below, is an excerpt from examples/dave.cpp. Use the copy_graph single-event visitor to create a copy the shortest-paths search-tree calculated by Dijkstra's algorithm.
boost::dijkstra_shortest_paths (G, vertex(a, G), distance_map(make_iterator_property_map(distance.begin(), vertex_id, distance[0])). predecessor_map(make_iterator_property_map(parent.begin(), vertex_id, parent[0])). visitor(make_dijkstra_visitor(copy_graph(G_copy, on_examine_edge()))));
Parameter | Description | Default |
---|---|---|
EventVisitorList |
A list of EventVisitor's created with std::pair. |
boost/graph/dijkstra_shortest_paths.hpp
This class implements all of the member functions required by DijkstraVisitor. In each function the appropriate event is dispatched to the EventVisitor's in the EventVisitorList.
Function | Description |
---|---|
template <class EventVisitorList> |
Returns the event visitor list adapted to be a Dijkstra Visitor. |
The following are event visitors: predecessor_recorder,
distance_recorder,
time_stamper,
and property_writer.
Copyright © 2000-2001 |