From 3b7fdb3886ab2d0aa0dcf5c551da93c3568598db Mon Sep 17 00:00:00 2001 From: 0xFugue <119708655+0xFugue@users.noreply.github.com> Date: Fri, 6 Jan 2023 17:23:53 +0530 Subject: [PATCH] comments --- generate_network.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/generate_network.py b/generate_network.py index 2a614d4..595ef27 100755 --- a/generate_network.py +++ b/generate_network.py @@ -68,6 +68,7 @@ def read_json(fname): jdata = json.load(f) return nx.node_link_graph(jdata) + # check if the required dir can be created def exists_or_nonempty(dirname): if not os.path.exists(dirname): @@ -165,7 +166,7 @@ def postprocess_network(G): def generate_subnets(G, num_subnets): n = len(G.nodes) - if num_subnets == n: # if k == size of the network + if num_subnets == n: # if num_subnets == size of the network return {f"{NODE_PREFIX}_{i}": f"{SUBNET_PREFIX}_{i}" for i in range(n)} lst = list(range(n))