Boost logo

Boost Users :

From: Cromwell Enage (sponage_at_[hidden])
Date: 2004-05-13 20:45:21


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net