Skip to content

Commit 07fc0e4

Browse files
committed
Fixed bug in example code
1 parent e7d0983 commit 07fc0e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
source = "A"
2020
destination = "D"
2121

22-
dijkstra_path = nx.dijkstra_path(G, source, destination)
22+
dijkstra_path = nx.dijkstra_path(G, source, destination, weight="cost")
2323
dijkstra_cost = nx.path_weight(G, dijkstra_path, "cost")
2424

2525
aco = ACO(G, ant_max_steps=100, num_iterations=100, ant_random_spawn=True)

0 commit comments

Comments
 (0)