@@ -313,7 +313,7 @@ function(digraph)
313313 digraph := EdgeWeightedDigraph(mutableOuts, mutableWeights);
314314 bellman := DIGRAPHS_Edge_Weighted_Bellman_Ford(digraph, new);
315315 bellmanDistances := bellman.distances;
316-
316+
317317 # new copy of neighbours and weights
318318 mutableOuts := OutNeighborsMutableCopy(digraph);
319319 mutableWeights := EdgeWeightsMutableCopy(digraph);
@@ -453,8 +453,8 @@ end);
453453InstallGlobalFunction(DIGRAPHS_Edge_Weighted_Dijkstra,
454454function (digraph, source )
455455 local weights, vertices, nrVertices, adj, u, outNeighbours, idx, v, w,
456- distances, parents, edges, vertex, visited, queue, node, currDist,
457- neighbour, edgeInfo, distance, i;
456+ distances, parents, edges, visited, queue, node, currDist, neighbour ,
457+ edgeInfo, distance, i;
458458
459459 weights := EdgeWeights(digraph);
460460 vertices := DigraphVertices(digraph);
@@ -544,13 +544,13 @@ end);
544544
545545InstallGlobalFunction(DIGRAPHS_Edge_Weighted_Bellman_Ford,
546546function (digraph, source )
547- local edgeList, weights, vertices, nrVertices, distances, u, outNeighbours, idx, v, w,
548- vertex, edge, parents, edges, d , i, flag, _;
547+ local edgeList, weights, vertices, nrVertices, distances, u, outNeighbours,
548+ idx, v, w, edge, parents, edges, i, flag, _;
549549
550550 weights := EdgeWeights(digraph);
551551 vertices := DigraphVertices(digraph);
552552 nrVertices := Size(vertices);
553-
553+
554554 edgeList := [] ;
555555 for u in DigraphVertices(digraph) do
556556 outNeighbours := OutNeighbours(digraph)[ u] ;
@@ -579,7 +579,7 @@ function(digraph, source)
579579 idx := edge[ 4 ] ;
580580
581581 if distances[ u] <> infinity
582- and Float(distances[ u] ) + Float(w) < Float(distances[ v] ) then
582+ and Float(distances[ u] ) + Float(w) < Float(distances[ v] ) then
583583 distances[ v] := distances[ u] + w;
584584
585585 parents[ v] := u;
0 commit comments