Skip to content

Commit b930c80

Browse files
committed
Clean
1 parent d6c7256 commit b930c80

6 files changed

Lines changed: 6 additions & 37 deletions

File tree

bafna_fvs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def get_fvs(og_G):
7878
return F
7979

8080

81-
def get_decycling_number_2_approx(G):
81+
def approx_decycling_number_bafna(G):
8282
clean_G = cleanup(G.copy())
8383
fvs = get_fvs(clean_G)
8484
return len(fvs)

constr_heur.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ def find_min_fvs(G):
1717
return fvs
1818

1919

20-
def get_decycling_number_constr_heur(G):
20+
def approx_decycling_number_stanojevic(G):
2121
return len(find_min_fvs(G.copy()))

exact_mif.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,5 +173,5 @@ def get_mif_len(G, K):
173173
)
174174

175175

176-
def get_decycling_number_mif(G):
176+
def get_decycling_number_razgon(G):
177177
return len(set(G.nodes)) - get_mif_len(G, set())

exact_mif_v2.py

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
import io
2-
31
import networkx as nx
42
import itertools
53

6-
import numpy as np
7-
84

95
def sort_nodes(node):
106
is_tuple = isinstance(node, tuple)
@@ -288,35 +284,8 @@ def main_procedure(G, F, active_v):
288284
return Exception("No suitable v found")
289285

290286

291-
def get_decycling_number_mif_v2(G):
287+
def get_decycling_number_fomin(G):
292288
if nx.is_forest(G):
293289
return 0
294290

295291
return len(G.nodes) - get_mif_len(G, set(), None)
296-
297-
298-
# if __name__ == "__main__":
299-
# block = """0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 1
300-
# 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 1 1
301-
# 0 0 0 0 0 0 0 1 0 1 1 1 0 0 0 0 1 0 0 1
302-
# 0 0 0 0 0 0 1 0 1 0 1 1 0 0 0 0 0 1 1 0
303-
# 0 0 0 0 0 1 1 0 0 0 1 0 1 0 0 0 1 0 1 0
304-
# 0 0 0 0 1 0 0 1 0 0 0 1 0 1 0 0 0 1 0 1
305-
# 0 0 0 1 1 0 0 1 0 0 0 0 0 1 1 0 0 0 0 1
306-
# 0 0 1 0 0 1 1 0 0 0 0 0 1 0 0 1 0 0 1 0
307-
# 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 1 1 0 0 1
308-
# 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 0 0 1 1 0
309-
# 0 0 1 1 1 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0
310-
# 0 0 1 1 0 1 0 0 0 0 0 0 1 0 1 1 0 0 0 0
311-
# 0 1 0 0 1 0 0 1 1 0 0 1 0 1 0 0 0 0 0 0
312-
# 1 0 0 0 0 1 1 0 0 1 1 0 1 0 0 0 0 0 0 0
313-
# 0 1 0 0 0 0 1 0 0 1 1 1 0 0 0 0 1 0 0 0
314-
# 1 0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0 1 0 0
315-
# 1 0 1 0 1 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0
316-
# 0 1 0 1 0 1 0 0 0 1 0 0 0 0 0 1 1 0 0 0
317-
# 1 1 0 1 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0
318-
# 1 1 1 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0"""
319-
#
320-
# np_matrix = np.loadtxt(io.StringIO(block), dtype=int)
321-
# G = nx.from_numpy_array(np_matrix)
322-
# print(get_decycling_number_mif_v2(G))

exact_mif_v3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ def get_mif_len(G, F, active_v):
294294
return len(S) + main_procedure(new_G, new_F, active_v)
295295

296296

297-
def get_decycling_number_mif_v3(G):
297+
def get_decycling_number_xiao(G):
298298
if nx.is_forest(G):
299299
return 0
300300

naive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ def naive_fvs(graph):
1616
return None
1717

1818

19-
def get_decycling_number(graph):
19+
def get_decycling_number_naive(graph):
2020
return len(naive_fvs(graph))

0 commit comments

Comments
 (0)