We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 981af26 commit c3ad125Copy full SHA for c3ad125
1 file changed
exact_mif_v2.py
@@ -97,7 +97,7 @@ def get_max_indep_set(G):
97
98
return res
99
100
- for u, v in itertools.combinations(sorted(G.nodes), 2):
+ for u, v in itertools.combinations(set(G.nodes), 2):
101
nb_u = set(nx.neighbors(G, u))
102
nb_v = set(nx.neighbors(G, v))
103
if (nb_v | {v}).issubset(nb_u | {u}):
0 commit comments