Boost logo

Boost :

Subject: Re: [boost] [graph] interest in resumable dijkstra?
From: Alex Hagen-Zanker (ahh34_at_[hidden])
Date: 2012-07-16 07:23:13

On 13/07/2012 19:24, Jeremiah Willcock wrote:
> On Fri, 13 Jul 2012, Alex Hagen-Zanker wrote:
>> I placed the BGL algorithm of the dijkstra_shortest_path in a class,
>> with the creation and initialization part separate from the main
>> algorithm. This allows interrupting, resetting and resuming the
>> algorithm. Would this be of interest to anybody?
> Yes, definitely.
>> The implementation requires C++11, because of auto and lambda's, it
>> also relies on the following patch:
> It would be nicer to have it be C++03, since nothing else in BGL
> requires C++11 yet.

There now is a new version that only requires C++03:

Using the class without auto takes some of the fun away, as:

auto dijkstra = make_dijkstra(g,
boost::distance_map(distance).vertex_index_map(indexmap).visitor(vis) );

     typedef boost::bgl_named_params<DistanceMap, boost::vertex_distance_t,
                 boost::bgl_named_params<IndexMap, boost::vertex_index_t,
boost::graph_visitor_t> > >Params;

    typedef boost::dijkstra_traits<Graph, Params>::dijkstra_type

     dijkstra_type dijkstra = make_dijkstra(g,
boost::distance_map(distance).vertex_index_map(indexmap).visitor(vis) );

> I haven't had a chance to look at it yet, but I'm definitely
> interested in putting it in when it's ready.
Thanks, please let me know what you think once you have taken a look.

Boost list run by bdawes at, gregod at, cpdaniel at, john at