improve efficiency

This commit is contained in:
2026-10-29 16:55:51 +02:00
parent 84a6ff03c2
commit 96a2614a9f
+2 -2
View File
@@ -161,8 +161,8 @@ def build_network(l_n):
join_nodes(g, nn(x, y, 'll'), nn((x + round(n//3)) % n, (y + round(n//3)) % n, 'll'))
join_nodes(g, nn(x, y, 'rr'), nn((x + round(n//2)) % n, (y + round(n//2)) % n, 'rr'))
join_nodes(g, nn(x, y, 'lr'), nn((x + round(n//3)) % n, (y - round(n//3)) % n, 'lr'))
join_nodes(g, nn(x, y, 'rl'), nn((x + round(n//2)) % n, (y - round(n//2)) % n, 'rl'))
join_nodes(g, nn(x, y, 'lr'), nn((x + round(n//5)) % n, (y - round(n//5)) % n, 'lr'))
join_nodes(g, nn(x, y, 'rl'), nn((x + round(n//6)) % n, (y - round(n//6)) % n, 'rl'))
return g