<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div style>Thanks a lot, even though I read half of the BGL book I didnt get this difference.</div><div style>I cant say Im good with techniques like that.</div> <div style><br></div><div style>Best,</div><div style>Tasos</div><div style>��</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br> ----------------------------------------------------------------------<br> <br> Message: 1<br> Date: Thu, 31 Jan 2013 11:12:29 -0500 (EST)<br> From: Jeremiah Willcock <<a href="mailto:jewillco@osl.iu.edu">jewillco@osl.iu.edu</a>><br> To: <a href="mailto:boost-users@lists.boost.org">boost-users@lists.boost.org</a><br> Subject: Re: [Boost-users] [Graph] visitor dijkstra_shortest_paths<br> Message-ID: <<a href="mailto:alpine.LRH.2.03.1301311111140.64740@cs.indiana.edu">alpine.LRH.2.03.1301311111140.64740@cs.indiana.edu</a>><br> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"<br> <br> On Thu, 31 Jan 2013, The Maschine wrote:<br> <br> ><br> > Hi all,<br> ><br> ><br> > Can someone explain me why I get an error with the first one and not the second?<br> ><br> ><br> > 1) (error)?boost::dijkstra_shortest_paths(m_ugraph,*vertex_iterator_begin,? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?<br> > ?boost::distance_map(boost::make_iterator_property_map(dist_map.begin(), boost::get(boost::vertex_index,<br> > m_ugraph))),<br> ><br> > boost::visitor(dijkstra_vis( *vertex_iterator_begin, superStorage ) ));<br> <br> The syntax for named parameters in Boost.Graph requires periods, so all<br> named arguments show up as a single argument to C++.<br> <br> > 2) (good)?boost::dijkstra_shortest_paths(m_ugraph,*vertex_iterator_begin,? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?<br> > ?boost::distance_map(boost::make_iterator_property_map(dist_map.begin(), boost::get(boost::vertex_index,<br> > m_ugraph))).visitor(dijkstra_vis( *vertex_iterator_begin, superStorage ))?);<br> ><br> ><br> ><br> > Why I need to "." the visitor on the distance_map?<br> <br> That's how it was implemented (before Boost.Parameter or variadic<br> templates existed).<br> <br> ><br> ><br> > BFS is ok with it:<br> ><br> > (good) boost::breadth_first_search(m_ugraph, *vertex_iterator_begin , boost::visitor(bfs_vis(<br> > *vertex_iterator_begin, superStorage ) ));<br> <br> You only have one named argument there; if you had more, you would need to<br> use a period between those as well.<br> <br> -- Jeremiah Willcock<br> <br></blockquote></div></div></div>