On 17.11.2014 15:16, ambasta wrote:
> One last bit. While using any of dijkstra/bellman_ford/astar_search function, where is the list of edges for shortest path stored?
>
> pred_map is a Vertex Property Map, so while this can give me the list of visited vertices, I still can not find the edges which were chosen. Is there a way to retrieve a list of edges in the shortest path as well?
If your graph does not contain parallel edges, you can simply call the
g.edge(pred_map[v], v) function. Otherwise you can simply store the
edges in a list as they are visited, by properly modifying the visitor
object.
Best,
Tiago
--
Tiago de Paula Peixoto <[hidden email]>
_______________________________________________
graph-tool mailing list
[hidden email]
http://lists.skewed.de/mailman/listinfo/graph-tool
signature.asc (836 bytes) Download Attachment--
Tiago de Paula Peixoto <[hidden email]>
If you reply to this email, your message will be added to the discussion below:http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/Using-a-EdgePropertyMap-object-as-weights-tp4025744p4025854.html