From a288a6a6b935e4c82ccf716cda56d9e34a1aa726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torma=20Krist=C3=B3f?= Date: Fri, 2 Oct 2020 01:31:45 +0200 Subject: [PATCH] it's a dict --- app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index eba75b3..94e88fb 100644 --- a/app.py +++ b/app.py @@ -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}")