[jgrapht-users] DijkstraShortestPath inefficient for (start,*) ?
Brought to you by:
barak_naveh,
perfecthash
From: kevin b. <kb...@ru...> - 2009-10-23 02:32:01
|
Hello, JGraphT's existing Dijkstra API is able to search for a single (start,end) vertex pair. However, it doesn't appear there is a good way to calculate all paths from a single source vertex: i.e. (source,*). Whereas the ideal run-time of Dijkstra's algorithm is O(E + V log(V)), it appears the best run-time with JGraphT's current API is O(V * ideal) for this use case. Maybe it's better to allow endVertex==null, and calculate the weight and predecessor maps for every vertex in that case? Any suggestions? Am I missing a good alternative? -- kevin brintnall =~ /kb...@ru.../ |