17 Dec
2005
17 Dec
'05
6:53 a.m.
matthieu.ferrant@agfa.com wrote: Hi Matthieu, as a side remark, please don't use HTML emails,
I have a non-directed, acyclical graph with a series of end points. I need to compute the longest path between any two end points. Right now I do this computing the longest dijkstra shortest path (using the boost graph library) from each end point and picking the longest of these, but this is quite heavy. Is there a faster way to do this ?
http://boost.org/libs/graph/doc/johnson_all_pairs_shortest.html and http://boost.org/libs/graph/doc/floyd_warshall_shortest.html allows you to compute distances between all pairs of vertices and it will be a bit more efficient than repeative applications of Dijkstra. - Volodya