improve efficiency
This commit is contained in:
@@ -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, '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, '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, 'lr'), nn((x + round(n//5)) % n, (y - round(n//5)) % 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, 'rl'), nn((x + round(n//6)) % n, (y - round(n//6)) % n, 'rl'))
|
||||||
|
|
||||||
return g
|
return g
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user