Boost logo

Boost Users :

Subject: [Boost-users] [Graph] visitor dijkstra_shortest_paths
From: The Maschine (justthemaschine_at_[hidden])
Date: 2013-01-31 08:21:07


Hi all,

Can someone explain me why I get an error with the first one and not the
second?

1) (error) boost::dijkstra_shortest_paths(m_ugraph,*vertex_iterator_begin,

 boost::distance_map(boost::make_iterator_property_map(dist_map.begin(),
boost::get(boost::vertex_index, m_ugraph))),

boost::visitor(dijkstra_vis( *vertex_iterator_begin, superStorage ) ));

2) (good) boost::dijkstra_shortest_paths(m_ugraph,*vertex_iterator_begin,
                                     boost::distance_map(boost::
make_iterator_property_map(dist_map.begin(), boost::get(boost::vertex_index,
m_ugraph))).visitor(dijkstra_vis( *vertex_iterator_begin, superStorage )) );

Why I need to "." the visitor on the distance_map?

BFS is ok with it:

(good) boost::breadth_first_search(m_ugraph, *vertex_iterator_begin , boost
::visitor(bfs_vis( *vertex_iterator_begin, superStorage ) ));

Best,

Tasos



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