
I don't see how this substitutes a hand-rolled queue.
And I don't see why this:
boost::bfs_visitor
On Thu, 20 May 2010, Eric Fowler wrote:
I wish to run a breadth_first_search() on a graph where I am defining the priority queue (I have a hand-rolled sort order). Is there any reason I cannot use std::priority_queue<> to do this? Does anyone have an example, or know of one in the docs?
One easy place to find that code is in this function in boost/graph/dijkstra_shortest_paths.hpp:
// Call breadth first search template
inline void dijkstra_shortest_paths_no_init (const Graph& g, typename graph_traits<Graph>::vertex_descriptor s, PredecessorMap predecessor, DistanceMap distance, WeightMap weight, IndexMap index_map, Compare compare, Combine combine, DistZero zero, DijkstraVisitor vis, ColorMap color); (note that there are other overloads that do not call breadth_first_search directly). That code creates a priority queue and uses it in BFS. I do not see any code in BGL that uses std::priority_queue in BFS.
-- Jeremiah Willcock _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users