Skip to content

Commit 8edad66

Browse files
committed
[FIXME] Hack to avoid edges duplication. Remove automata printing.
1 parent c840e10 commit 8edad66

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

cfpq_add_context/gen_automata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ def generate (number_of_contexts):
2121

2222
result = Matrix.from_edgelist(edges, dtype=UINT64, nrows=nvertices + 1, ncols=nvertices + 1, name="automata")
2323

24-
print_matrix_to_dot(result, "atm.dot")
24+
#print_matrix_to_dot(result, "atm.dot")
2525

2626
return result

cfpq_add_context/load_graph.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ def handle_line(line):
6060

6161
with open (file_path,'r') as file:
6262
edges = [handle_line(line) for line in file if len(line.strip()) > 0]
63-
result = Matrix.from_edgelist(edges, dtype=UINT64, nrows=nvertices + 1, ncols=nvertices + 1, name="graph")
63+
#TODO Remove dup_op! It is a hack to avoid edges duplication.
64+
result = Matrix.from_edgelist(edges, dtype=UINT64, nrows=nvertices + 1, ncols=nvertices + 1, name="graph",dup_op="max")
6465
#print_matrix_to_dot(result, "graph.dot")
6566
return (result, (number_of_contexts // 2) + 1)
6667

0 commit comments

Comments
 (0)