
I don't see how this substitutes a hand-rolled queue. And I don't see why this: boost::bfs_visitor<null_visitor> nv; std::stack<T> q; breadth_first_search(graph, vertex, q, nv); Is getting me this: In file included from MyDialog.h:8, from MyDialog.cpp:2: ../DelaunayGraph/DelaunayGraph.h: In member function ‘Vertex DelaunayGraph<T>::seek_vertex_nearest_point(const POS<T>&) const [with T = short int]’: MyDialog.cpp:44: instantiated from here ../DelaunayGraph/DelaunayGraph.h:214: error: no matching function for call to ‘breadth_first_search(const DelaunayGraph<short int>&, const Vertex&, std::stack<short int, std::deque<short int, std::allocator<short int> > >&, boost::bfs_visitor<boost::null_visitor>&)’ make: *** [MyDialog.o] Error 1 Eric On Thu, May 20, 2010 at 11:13 AM, Jeremiah Willcock <jewillco@osl.iu.edu> wrote:
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 <class Graph, class DijkstraVisitor, class PredecessorMap, class DistanceMap, class WeightMap, class IndexMap, class Compare, class Combine, class DistZero, class ColorMap> 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