forked from hofmannol/AlgoDatSoSe25
Added forgotten print to fullfill task
This commit is contained in:
parent
0c8afa7caf
commit
7db8e8c863
@ -177,7 +177,7 @@ def graphvizify(filePath: str, outputFile: str = 'build/hoehleGraph', edges=None
|
|||||||
with open(filePath, 'r') as f:
|
with open(filePath, 'r') as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
# Cap "<STRING>";"<STRING>";<NUMBER>
|
# Cap "<STRING>";"<STRING>";<NUMBER> No whitespaces for sanity
|
||||||
match = re.match(r'"([^"]+)"\s*;\s*"([^"]+)"\s*;\s*(\d+)', line)
|
match = re.match(r'"([^"]+)"\s*;\s*"([^"]+)"\s*;\s*(\d+)', line)
|
||||||
if match:
|
if match:
|
||||||
node1, node2, weight = match.groups()
|
node1, node2, weight = match.groups()
|
||||||
@ -218,6 +218,8 @@ if __name__ == "__main__":
|
|||||||
timeMS(caveGraph.prim, start)
|
timeMS(caveGraph.prim, start)
|
||||||
timeMS(caveGraph.kruskal)
|
timeMS(caveGraph.kruskal)
|
||||||
|
|
||||||
|
print(f"MinPrim: {sum(mstEdges.values())} <+#+> MinKruskal: {sum(mstEdgesKruskal.values())}")
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
||||||
## Old Search for shortest Path, no MST
|
## Old Search for shortest Path, no MST
|
||||||
|
Loading…
x
Reference in New Issue
Block a user