diff options
Diffstat (limited to 'algorithms.py')
| -rw-r--r-- | algorithms.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/algorithms.py b/algorithms.py index 9d83b26..6e01287 100644 --- a/algorithms.py +++ b/algorithms.py @@ -33,8 +33,9 @@ def get_closest_node_id(nodes, source_node): def find_shortest_path(nodes, source_id, target_id): """ Return the shortest path using Dijkstra's algortihm. """ - # queue contains multiple (path_length, (node_0, node_1, ... node_n))-tuples + # queue contains multiple (walk_dist, (node_0, node_1, ... node_n))-tuples # where (node_0, node_1, ... node_n) is a walk to node_n + # and walk_dist is the total length of the walk in meters queue = [(0, (source_id,))] visited = set() |
