Added doctests

This commit is contained in:
Joelkurien 2024-10-28 14:36:29 +11:00
commit 3d4acaaefb

View File

@ -139,9 +139,11 @@ class JohnsonGraph:
vertex_b,
weight + hash_path[vertex_a] - hash_path[vertex_b],
)
self.edges[i] = (vertex_a,
self.edges[i] = (
vertex_a,
vertex_b,
weight + hash_path[vertex_a] - hash_path[vertex_b])
weight + hash_path[vertex_a] - hash_path[vertex_b],
)
self.graph.pop("#")
filtered_edges = []