Fix typos in prints

This commit is contained in:
Marcin Kostrzewski 2022-06-21 16:15:55 +02:00
parent e93cc98193
commit 46ae4299c4

View File

@ -209,7 +209,7 @@ def bus_experiment():
do_graph_animation(f'bus{i}.gif', bus, 90, nx.spiral_layout) do_graph_animation(f'bus{i}.gif', bus, 90, nx.spiral_layout)
speeds.append(bus.rounds_survived / node_count) speeds.append(bus.rounds_survived / node_count)
degrees.append(bus_avg_degree) degrees.append(bus_avg_degree)
print(f"\n{node_count} NODE STAR") print(f"\n{node_count} NODE BUS")
print(f"average degree = {bus_avg_degree}") print(f"average degree = {bus_avg_degree}")
print(f"propagation speed = {round(speeds[-1], 2)}") print(f"propagation speed = {round(speeds[-1], 2)}")
print(f"bus_{i} rounds survived = {bus.rounds_survived + 1}") print(f"bus_{i} rounds survived = {bus.rounds_survived + 1}")
@ -225,7 +225,7 @@ def ring_experiment():
do_graph_animation(f'ring{i}.gif', ring, 90, nx.spiral_layout) do_graph_animation(f'ring{i}.gif', ring, 90, nx.spiral_layout)
speeds.append(ring.rounds_survived / node_count) speeds.append(ring.rounds_survived / node_count)
degrees.append(ring_avg_degree) degrees.append(ring_avg_degree)
print(f"\n{node_count} NODE STAR") print(f"\n{node_count} NODE RING")
print(f"average degree = {ring_avg_degree}") print(f"average degree = {ring_avg_degree}")
print(f"propagation speed = {round(speeds[-1], 2)}") print(f"propagation speed = {round(speeds[-1], 2)}")
print(f"ring_{i} rounds survived = {ring.rounds_survived + 1}") print(f"ring_{i} rounds survived = {ring.rounds_survived + 1}")