]> granicus.if.org Git - graphviz/commitdiff
dijkstra.c: reflow some text
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 19 Dec 2021 19:52:47 +0000 (11:52 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 19 Dec 2021 23:17:48 +0000 (15:17 -0800)
lib/neatogen/dijkstra.c

index 37b1e7ce825494f0d8f87cd45fd69dac4bbb7fb9..3f3ae34e7898c3d512d7a3b7e9aae2f9d8068fd8 100644 (file)
@@ -159,10 +159,8 @@ void dijkstra(int vertex, vtx_data * graph, int n, DistType * dist)
            break;
        for (i = 1; i < graph[closestVertex].nedges; i++) {
            neighbor = graph[closestVertex].edges[i];
-           increaseKey(&H, neighbor,
-                       closestDist +
-                       (DistType) graph[closestVertex].ewgts[i], index,
-                       dist);
+           increaseKey(&H, neighbor, closestDist +
+                       (DistType)graph[closestVertex].ewgts[i], index, dist);
        }
        prevClosestDist = closestDist;
     }
@@ -234,10 +232,8 @@ dijkstra_bounded(int vertex, vtx_data * graph, int n, DistType * dist,
            break;
        for (i = 1; i < graph[closestVertex].nedges; i++) {
            neighbor = graph[closestVertex].edges[i];
-           increaseKey(&H, neighbor,
-                       closestDist +
-                       (DistType) graph[closestVertex].ewgts[i], index,
-                       dist);
+           increaseKey(&H, neighbor, closestDist +
+                       (DistType)graph[closestVertex].ewgts[i], index, dist);
        }
     }
 
@@ -357,8 +353,7 @@ void dijkstra_f(int vertex, vtx_data * graph, int n, float *dist)
            break;
        for (i = 1; i < graph[closestVertex].nedges; i++) {
            neighbor = graph[closestVertex].edges[i];
-           increaseKey_f(&H, neighbor,
-                         closestDist + graph[closestVertex].ewgts[i],
+           increaseKey_f(&H, neighbor, closestDist + graph[closestVertex].ewgts[i],
                          index, dist);
        }
     }
@@ -411,4 +406,3 @@ int dijkstra_sgd(graph_sgd *graph, int source, term_sgd *terms) {
     free(dists);
     return offset;
 }
-