pysal.explore.spaghetti.
dijkstra_mp
(ntw_cost_node)[source]¶Compute the shortest path between a start node and all other nodes in the web utilizing multiple cores upon request.
Parameters: |
|
---|---|
Returns: |
|
Notes
Based on [Dij59].
Examples
>>> import pysal.explore.spaghetti as spgh
>>> from pysal.lib import examples
>>> ntw = spgh.Network(examples.get_path('streets.shp'))
>>> distance, pred = spgh.util.dijkstra(ntw, ntw.edge_lengths, 0)
>>> round(distance[196], 4)
5505.6682
>>> pred[196]
133