This commit is contained in:
parent
aed7f80c42
commit
0c4842a6f5
@ -32,12 +32,9 @@ del_list = []
|
||||
G = read_graph(args.graph)
|
||||
n = len(G.nodes)
|
||||
while max_comp_size(G) > n / 2:
|
||||
u = np.random.choice(G.nodes)
|
||||
if u not in del_list:
|
||||
del_list.append(u)
|
||||
G.remove_node(u)
|
||||
|
||||
# print len(del_list), del_list
|
||||
mnc = nx.minimum_node_cut(G=G)
|
||||
del_list.append(mnc)
|
||||
G.remove_nodes_from(mnc)
|
||||
|
||||
|
||||
for u in del_list:
|
||||
|
Loading…
Reference in New Issue
Block a user