Skip to content

Commit 6ffdf3d

Browse files
authored
Merge pull request #128 from GraphFilter/126-bug-export-graph6
126 bug export graph6
2 parents d54db74 + 2f2229b commit 6ffdf3d

4 files changed

Lines changed: 2 additions & 11 deletions

File tree

source/controller/controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def export_to_g6(self):
157157
self.show_loading_window(len(project_information_store.filtered_graphs))
158158
file = open(file_name, 'w')
159159
for step, graph in enumerate(project_information_store.filtered_graphs):
160-
file.write(graph)
160+
file.write(f'{graph}\n')
161161
self.update_loading_window(step)
162162
file.close()
163163
self.loading_window.close()

source/store/operations_and_invariants/invariants.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ def max_line_of_string(text: str):
104104
list_text = str(text).split("\n")
105105
return len(max(list_text, key=len))
106106

107-
108107
@staticmethod
109108
def MainEigenvalue(matrix: np.ndarray):
110109
eigenvalues, vectors = la.eigh(matrix)
@@ -114,9 +113,3 @@ def MainEigenvalue(matrix: np.ndarray):
114113
if UtilsToInvariants.approx_to_int(np.dot(one, vectors[:, i])) != 0:
115114
mains.add(value)
116115
return mains
117-
118-
119-
120-
121-
122-

source/store/operations_and_invariants/num_invariants.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,12 +587,11 @@ def calculate(graph):
587587
@staticmethod
588588
def print(graph, precision):
589589
if nx.number_of_isolates(graph) < 1:
590-
return Utils.print_set(nx.algorithms.covering.min_edge_cover(graph),precision)
590+
return Utils.print_set(nx.algorithms.covering.min_edge_cover(graph), precision)
591591
else:
592592
return "Graph has isolate vertice."
593593

594594

595-
596595
class NumberOfTriangles(InvariantNum):
597596
name = "Number of triangles"
598597
code = '\u03A4'

source/store/operations_and_invariants/other_invariants.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ def print(graph, precision):
262262
return Utils.print_eigenvectors_and_eigenvalues(NormalizedLaplacianEigenvectors.calculate(graph), precision)
263263

264264

265-
266265
class MaximumClique(InvariantOther):
267266
name = "Maximum Clique"
268267
type = 'set'

0 commit comments

Comments
 (0)