Graph distances, how can I speed it up?

David Eppstein eppstein at ics.uci.edu
Mon Jun 3 12:43:48 EDT 2002


In article <d571ae53.0206030815.2e52aac at posting.google.com>,
 ellisjb at my-deja.com (Jonathan Ellis) wrote:

> The obvious idea then is to not calculate anything until all edges
> have been added.  Then use dijkstra's algorithm
> (http://ciips.ee.uwa.edu.au/~morris/Year2/PLDS210/dijkstra.html)
> to compute and store distances as needed.

There is a Python implementation of Dijkstra's algorithm at
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/119466

-- 
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