Boost logo

Boost Users :

Subject: [Boost-users] boost dijkstra : retrieve the whole path
From: Viviane Parent (foxadpatres_at_[hidden])
Date: 2012-09-05 09:51:36


Hello people

I'm stubbling on a very stupid problem I think, but I can't find any hint
about it.

I'm using the boost algorithm dijkstra_shortest_path and I simply want to
know how to retrieve all the steps the algo goes through for the shortest
path found.
To illustrate : I'm glad to know that to go from A to Z, the minimal cost
is 26, but I would like also to know that this path goes from A to B then
from B to C etc.

I used the example http://www.boost.org/doc/libs/1_51 [...]
ample.cpp<http://www.boost.org/doc/libs/1_51_0/libs/graph/example/dijkstra-example.cpp%29>
So I ended up with dijkstra_shortest_paths(g, s, &p[0], &d[0], weightmap,
indexmap, std::less<int>(), closed_plus<int>(),
(std::numeric_limits<int>::max)(), 0,default_dijkstra_visitor()); (I use
Visual)
Is the info I need somewhere in the visitor, or something ?

Thanks for any help you can provide,

Sorry for my crappy english
V



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