<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 &lt;<a href="mailto:jewillco@osl.iu.edu">jewillco@osl.iu.edu</a>&gt;<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: &lt;<a href="mailto:alpine.LRH.2.03.1301311111140.64740@cs.indiana.edu">alpine.LRH.2.03.1301311111140.64740@cs.indiana.edu</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;; Format=&quot;flowed&quot;<br>
<br>
On Thu, 31 Jan 2013, The Maschine wrote:<br>
<br>
&gt;<br>
&gt; Hi all,<br>
&gt;<br>
&gt;<br>
&gt; Can someone explain me why I get an error with the first one and not the second?<br>
&gt;<br>
&gt;<br>
&gt; 1) (error)?boost::dijkstra_shortest_paths(m_ugraph,*vertex_iterator_begin,? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?<br>
&gt; ?boost::distance_map(boost::make_iterator_property_map(dist_map.begin(), boost::get(boost::vertex_index,<br>
&gt; m_ugraph))),<br>
&gt;<br>
&gt; 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>
&gt; 2) (good)?boost::dijkstra_shortest_paths(m_ugraph,*vertex_iterator_begin,? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?<br>
&gt; ?boost::distance_map(boost::make_iterator_property_map(dist_map.begin(), boost::get(boost::vertex_index,<br>
&gt; m_ugraph))).visitor(dijkstra_vis( *vertex_iterator_begin, superStorage ))?);<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Why I need to &quot;.&quot; the visitor on the distance_map?<br>
<br>
That&#39;s how it was implemented (before Boost.Parameter or variadic<br>
templates existed).<br>
<br>
&gt;<br>
&gt;<br>
&gt; BFS is ok with it:<br>
&gt;<br>
&gt; (good) boost::breadth_first_search(m_ugraph, *vertex_iterator_begin , boost::visitor(bfs_vis(<br>
&gt; *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>