diff --git a/schoeffelbe/pr10.py b/schoeffelbe/pr10.py index 3a9a197..dd49f55 100644 --- a/schoeffelbe/pr10.py +++ b/schoeffelbe/pr10.py @@ -177,7 +177,7 @@ def graphvizify(filePath: str, outputFile: str = 'build/hoehleGraph', edges=None with open(filePath, 'r') as f: for line in f: line = line.strip() - # Cap "";""; + # Cap "";""; No whitespaces for sanity match = re.match(r'"([^"]+)"\s*;\s*"([^"]+)"\s*;\s*(\d+)', line) if match: node1, node2, weight = match.groups() @@ -218,6 +218,8 @@ if __name__ == "__main__": timeMS(caveGraph.prim, start) timeMS(caveGraph.kruskal) + print(f"MinPrim: {sum(mstEdges.values())} <+#+> MinKruskal: {sum(mstEdgesKruskal.values())}") + exit(0); ## Old Search for shortest Path, no MST