Re: [Boost-users] Visitor makes Dijkstra slow

Hello, Martin! Graphs are supposed to be passed by reference to visitor functions. Your program didn't do that, so it created tons of temporary graph copies. Changing template<typename V, typename G> void operator()(V v, G g) { ++dummy; } to template<typename V, typename G> void operator()(V v, G& g) { ++dummy; } and template<typename V, typename G> void examine_vertex(V v, G g) { ++dummy; } to template<typename V, typename G> void examine_vertex(V v, G& g) { ++dummy; } should reduce your running times about 500-fold, down to the expected running times. HTH Cromwell Enage __________________________________ Do you Yahoo!? Yahoo! Movies - Buy advance tickets for 'Shrek 2' http://movies.yahoo.com/showtimes/movie?mid=1808405861
participants (1)
-
Cromwell Enage