File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -139,9 +139,11 @@ def johnson_algo(self) -> list[dict]:
139139 vertex_b ,
140140 weight + hash_path [vertex_a ] - hash_path [vertex_b ],
141141 )
142- self .edges [i ] = (vertex_a ,
143- vertex_b ,
144- weight + hash_path [vertex_a ] - hash_path [vertex_b ])
142+ self .edges [i ] = (
143+ vertex_a ,
144+ vertex_b ,
145+ weight + hash_path [vertex_a ] - hash_path [vertex_b ],
146+ )
145147
146148 self .graph .pop ("#" )
147149 filtered_edges = []
@@ -154,7 +156,7 @@ def johnson_algo(self) -> list[dict]:
154156 for vertex1 , vertex2 , node_weight in self .edges :
155157 if vertex1 == vertex :
156158 self .graph [vertex ].append ((vertex2 , node_weight ))
157-
159+
158160 distances = []
159161 for vertex1 in self .graph :
160162 new_dist = self .dijkstra (vertex1 )
You can’t perform that action at this time.
0 commit comments