Skip to content
Snippets Groups Projects
Commit c748916b authored by Rhydian Brown's avatar Rhydian Brown
Browse files

fix random distance

parent 53f5ed39
No related branches found
No related tags found
No related merge requests found
...@@ -55,8 +55,8 @@ with out.open("w") as f: ...@@ -55,8 +55,8 @@ with out.open("w") as f:
# write connections # write connections
keys = list(nodes.keys()) keys = list(nodes.keys())
for a, v in nodes.items(): for a, v in nodes.items():
distance = random.randint(min_distance, max_distance)
for b in v: for b in v:
distance = random.randint(min_distance, max_distance)
f.write(f"{keys.index(a)} {keys.index(b)} {distance}\n") f.write(f"{keys.index(a)} {keys.index(b)} {distance}\n")
print("saved to", out.name) print("saved to", out.name)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment