it's a dict
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Torma Kristóf 2020-10-02 01:31:45 +02:00
parent 179f6450e0
commit a288a6a6b9
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047

4
app.py
View File

@ -3,7 +3,7 @@
import igraph as ig
def read_graph(graph_file: str = 'valos_halozat_other_dataset.txt') -> map:
def read_graph(graph_file: str = 'valos_halozat_other_dataset.txt') -> dict:
with open(graph_file) as f:
vertices = int(f.readline())
edges = int(f.readline())
@ -14,7 +14,7 @@ def read_graph(graph_file: str = 'valos_halozat_other_dataset.txt') -> map:
return {"graph": result_graph, "edges:": edges, "vertices": vertices}
def calclulate_values(graph_data: map):
def calclulate_values(graph_data: dict):
print(f"Klaszterezettseg: {graph_data['graph'].clusters()}")
print(f"Atlagos fokszam: {(graph_data['edges'] * 2) / graph_data['vertices']}")
print(f"Komponensek: {graph_data['graph'].components}")