From a5f414fb2a03e66b3ee51ab1232be73ddd023a21 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Fri, 22 Jul 2022 17:40:26 -0700 Subject: [PATCH] neatogen bfs_bounded: remove unused 'n' parameter --- lib/neatogen/bfs.c | 2 +- lib/neatogen/bfs.h | 3 +-- lib/neatogen/dijkstra.c | 2 +- lib/neatogen/stress.c | 3 +-- 4 files changed, 4 insertions(+), 6 deletions(-) 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;) { -- 2.40.0