Skip to content

Commit fe0bfc3

Browse files
committed
Small cleanup of result normalization.
1 parent 5b16c8d commit fe0bfc3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cfpq_add_context/add_contexts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def add_context(file_path, max_num_of_contexts):
189189

190190
decomposed_result = to_label_decomposed_graph(result, automata.nrows, graph.nrows)
191191
decomposition_end = time.perf_counter()
192-
print("Graph decomposition competed in ", decomposition_end - intersection_end)
192+
print("Graph decomposition completed in ", decomposition_end - intersection_end)
193193

194194
return (decomposed_result, graph.ncols)
195195

@@ -201,7 +201,7 @@ def normalize(solver_result, initial_graph_nvertices):
201201
start_vertices = set([i * c for i in range(0,initial_graph_nvertices)])
202202
edges = solver_result.to_edgelist()
203203
edges = zip(edges[0], edges[1])
204-
new_edges = set([(_edg[0] // c, _edg[1] // c) for (_edg, _lbl) in edges if _edg[0] in start_vertices])
204+
new_edges = [(_edg[0] // c, _edg[1] // c) for (_edg, _lbl) in edges if _edg[0] in start_vertices]
205205
result = Matrix.from_edgelist(new_edges, values=True, dtype=BOOL, nrows = initial_graph_nvertices,
206206
ncols=initial_graph_nvertices, name = "normalized_solver_result")
207207
normalization_end = time.perf_counter()

0 commit comments

Comments
 (0)