Graph distances, how can I speed it up?
David Eppstein
eppstein at ics.uci.edu
Mon Jun 3 13:12:24 EDT 2002
In article <B92114F6.B79E%pereira at cis.upenn.edu>,
Fernando Pereira <pereira at cis.upenn.edu> wrote:
> Dijkstra's algorithm is not a good choice here, because distances from all
> sources appear to be needed, not from a single source.
Dijkstra is not a bad choice for all pairs shortest paths -- just repeat
it for each source in the graph.
--
David Eppstein UC Irvine Dept. of Information & Computer Science
eppstein at ics.uci.edu http://www.ics.uci.edu/~eppstein/
More information about the Python-list
mailing list