From 997d57006d2333dac8eb41219888d3666d33ccb2 Mon Sep 17 00:00:00 2001 From: Michael Young Date: Tue, 11 Jun 2024 14:55:42 +0100 Subject: [PATCH] Linting --- gap/weights.gi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gap/weights.gi b/gap/weights.gi index 390cac4b8..5c5ef640a 100644 --- a/gap/weights.gi +++ b/gap/weights.gi @@ -313,7 +313,7 @@ function(digraph) digraph := EdgeWeightedDigraph(mutableOuts, mutableWeights); bellman := DIGRAPHS_Edge_Weighted_Bellman_Ford(digraph, new); bellmanDistances := bellman.distances; - + # new copy of neighbours and weights mutableOuts := OutNeighborsMutableCopy(digraph); mutableWeights := EdgeWeightsMutableCopy(digraph); @@ -453,8 +453,8 @@ end); InstallGlobalFunction(DIGRAPHS_Edge_Weighted_Dijkstra, function(digraph, source) local weights, vertices, nrVertices, adj, u, outNeighbours, idx, v, w, - distances, parents, edges, vertex, visited, queue, node, currDist, - neighbour, edgeInfo, distance, i; + distances, parents, edges, visited, queue, node, currDist, neighbour, + edgeInfo, distance, i; weights := EdgeWeights(digraph); vertices := DigraphVertices(digraph); @@ -544,13 +544,13 @@ end); InstallGlobalFunction(DIGRAPHS_Edge_Weighted_Bellman_Ford, function(digraph, source) - local edgeList, weights, vertices, nrVertices, distances, u, outNeighbours, idx, v, w, - vertex, edge, parents, edges, d, i, flag, _; + local edgeList, weights, vertices, nrVertices, distances, u, outNeighbours, + idx, v, w, edge, parents, edges, i, flag, _; weights := EdgeWeights(digraph); vertices := DigraphVertices(digraph); nrVertices := Size(vertices); - + edgeList := []; for u in DigraphVertices(digraph) do outNeighbours := OutNeighbours(digraph)[u]; @@ -579,7 +579,7 @@ function(digraph, source) idx := edge[4]; if distances[u] <> infinity - and Float(distances[u]) + Float(w) < Float(distances[v]) then + and Float(distances[u]) + Float(w) < Float(distances[v]) then distances[v] := distances[u] + w; parents[v] := u;