From 606c3eebe19114bcd2d07546a7c7d800ca84973f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Fri, 6 Nov 2020 10:54:18 +0100 Subject: more comments --- algorithms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'algorithms.py') 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() -- cgit v1.2.1