add todo
This commit is contained in:
parent
cbb744e468
commit
42c71a201d
3
main.py
3
main.py
@ -72,6 +72,9 @@ def _create_node(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# TODO this should take a graph / adjacency list as argument and set peers based on that.
|
||||||
|
# currently all nodes are connected to all other nodes, which scales with O(n!) and
|
||||||
|
# takes significant amounts of time and compute for even small n < 10.
|
||||||
def _connect_nodes(nodes: Dict[str, MeshNodeConfig]) -> None:
|
def _connect_nodes(nodes: Dict[str, MeshNodeConfig]) -> None:
|
||||||
for src, dst in itertools.permutations(nodes.keys(), 2):
|
for src, dst in itertools.permutations(nodes.keys(), 2):
|
||||||
nodes[dst].peers.append(nodes[src])
|
nodes[dst].peers.append(nodes[src])
|
||||||
|
Loading…
Reference in New Issue
Block a user