From: Matthew Fernandez Date: Sat, 23 Jul 2022 00:40:26 +0000 (-0700) Subject: neatogen bfs_bounded: remove unused 'n' parameter X-Git-Tag: 5.0.1~28^2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a5f414fb2a03e66b3ee51ab1232be73ddd023a21;p=graphviz neatogen bfs_bounded: remove unused 'n' parameter --- diff --git a/lib/neatogen/bfs.c b/lib/neatogen/bfs.c index 61d896aae..a6f9d7ea0 100644 --- a/lib/neatogen/bfs.c +++ b/lib/neatogen/bfs.c @@ -68,7 +68,7 @@ void bfs(int vertex, vtx_data * graph, int n, DistType * dist, Queue * Q) } int -bfs_bounded(int vertex, vtx_data * graph, int n, DistType * dist, +bfs_bounded(int vertex, vtx_data * graph, DistType * dist, Queue * Q, int bound, int *visited_nodes) /* compute vector 'dist' of distances of all nodes from 'vertex' */ /* ignore nodes whose distance to 'vertex' is more than bound */ diff --git a/lib/neatogen/bfs.h b/lib/neatogen/bfs.h index f0487bd26..61f8ef0e4 100644 --- a/lib/neatogen/bfs.h +++ b/lib/neatogen/bfs.h @@ -32,8 +32,7 @@ extern "C" { extern bool enQueue(Queue *, int); extern void bfs(int, vtx_data *, int, DistType *, Queue *); - extern int bfs_bounded(int, vtx_data *, int, DistType *, Queue *, int, - int *); + extern int bfs_bounded(int, vtx_data*, DistType *, Queue*, int, int*); #ifdef __cplusplus } diff --git a/lib/neatogen/dijkstra.c b/lib/neatogen/dijkstra.c index eccaaa775..99e81811f 100644 --- a/lib/neatogen/dijkstra.c +++ b/lib/neatogen/dijkstra.c @@ -198,7 +198,7 @@ dijkstra_bounded(int vertex, vtx_data * graph, int n, DistType * dist, dist[i] = -1; /* far, TOO COSTLY (O(n))! */ } num_visited_nodes = - bfs_bounded(vertex, graph, n, dist, &Q, bound, visited_nodes); + bfs_bounded(vertex, graph, dist, &Q, bound, visited_nodes); bitarray_t node_in_neighborhood = bitarray_new_or_exit(n); for (i = 0; i < num_visited_nodes; i++) { bitarray_set(&node_in_neighborhood, visited_nodes[i], true); diff --git a/lib/neatogen/stress.c b/lib/neatogen/stress.c index 4fd4eb7f9..dac0db524 100644 --- a/lib/neatogen/stress.c +++ b/lib/neatogen/stress.c @@ -441,8 +441,7 @@ static int sparse_stress_subspace_majorization_kD(vtx_data * graph, /* Input gra visited_nodes); } else { num_visited_nodes = - bfs_bounded(i, graph, n, dist, &Q, dist_bound, - visited_nodes); + bfs_bounded(i, graph, dist, &Q, dist_bound, visited_nodes); } /* filter the pivots out of the visited nodes list, and the self loop: */ for (j = 0; j < num_visited_nodes;) {