|
Boost Users : |
Subject: Re: [Boost-users] [Graph] visitor dijkstra_shortest_paths
From: The Maschine (justthemaschine_at_[hidden])
Date: 2013-02-01 07:14:54
Thanks a lot, even though I read half of the BGL book I didnt get this
difference.
I cant say Im good with techniques like that.
Best,
Tasos
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 31 Jan 2013 11:12:29 -0500 (EST)
> From: Jeremiah Willcock <jewillco_at_[hidden]>
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] [Graph] visitor dijkstra_shortest_paths
> Message-ID: <alpine.LRH.2.03.1301311111140.64740_at_[hidden]>
> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
>
> On Thu, 31 Jan 2013, The Maschine wrote:
>
> >
> > 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 ) ));
>
> The syntax for named parameters in Boost.Graph requires periods, so all
> named arguments show up as a single argument to C++.
>
> > 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?
>
> That's how it was implemented (before Boost.Parameter or variadic
> templates existed).
>
> >
> >
> > BFS is ok with it:
> >
> > (good) boost::breadth_first_search(m_ugraph, *vertex_iterator_begin ,
> boost::visitor(bfs_vis(
> > *vertex_iterator_begin, superStorage ) ));
>
> You only have one named argument there; if you had more, you would need to
> use a period between those as well.
>
> -- Jeremiah Willcock
>
>
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