}
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 */
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
}
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);
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;) {