This commit is contained in:
parent
204a5ec17b
commit
1dad24f989
2
app.py
2
app.py
@ -8,7 +8,7 @@ def read_graph(graph_file: str = 'valos_halozat_other_dataset.txt') -> dict:
|
|||||||
vertices = int(f.readline())
|
vertices = int(f.readline())
|
||||||
edges = int(f.readline())
|
edges = int(f.readline())
|
||||||
result_graph: ig.Graph = ig.Graph(vertices)
|
result_graph: ig.Graph = ig.Graph(vertices)
|
||||||
for _ in range(edges):
|
for _ in range(1, edges):
|
||||||
line = f.readline().split('\t')
|
line = f.readline().split('\t')
|
||||||
result_graph.add_edge(int(line[0]), int(line[1]))
|
result_graph.add_edge(int(line[0]), int(line[1]))
|
||||||
return {"graph": result_graph, "edges": edges, "vertices": vertices}
|
return {"graph": result_graph, "edges": edges, "vertices": vertices}
|
||||||
|
Loading…
Reference in New Issue
Block a user