From f38825dca836145159b08d27d0c10df915681706 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Fri, 22 Jul 2022 17:32:16 -0700 Subject: [PATCH] neatogen initLayout: remove unused 'graph' parameter --- lib/neatogen/constrained_majorization.c | 2 +- lib/neatogen/constrained_majorization_ipsep.c | 2 +- lib/neatogen/stress.c | 7 ++----- lib/neatogen/stress.h | 2 +- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/lib/neatogen/constrained_majorization.c b/lib/neatogen/constrained_majorization.c index 46136b68d..e30c7db78 100644 --- a/lib/neatogen/constrained_majorization.c +++ b/lib/neatogen/constrained_majorization.c @@ -155,7 +155,7 @@ int stress_majorization_with_hierarchy(vtx_data * graph, /* Input graph in spars } } } else { - initLayout(graph, n, dim, d_coords, nodes); + initLayout(n, dim, d_coords, nodes); if (compute_hierarchy(graph, n, abs_tol, relative_tol, NULL, &ordering, &levels, &num_levels)) { iterations = -1; diff --git a/lib/neatogen/constrained_majorization_ipsep.c b/lib/neatogen/constrained_majorization_ipsep.c index fce7362c1..34b1292e6 100644 --- a/lib/neatogen/constrained_majorization_ipsep.c +++ b/lib/neatogen/constrained_majorization_ipsep.c @@ -100,7 +100,7 @@ int stress_majorization_cola(vtx_data * graph, /* Input graph in sparse represen float maxEdgeLen = 0; double max = 1; - initLayout(graph, n, dim, d_coords, nodes); + initLayout(n, dim, d_coords, nodes); if (n == 1) return 0; diff --git a/lib/neatogen/stress.c b/lib/neatogen/stress.c index 032fe3050..4fd4eb7f9 100644 --- a/lib/neatogen/stress.c +++ b/lib/neatogen/stress.c @@ -138,10 +138,7 @@ compute_stress1(double **coords, dist_data * distances, int dim, int n, int exp) * a position, use it. * Return true if some node is fixed. */ -int -initLayout(vtx_data * graph, int n, int dim, double **coords, - node_t ** nodes) -{ +int initLayout(int n, int dim, double **coords, node_t **nodes) { node_t *np; double *xp; double *yp; @@ -984,7 +981,7 @@ int stress_majorization_kD_mkernel(vtx_data * graph, /* Input graph in sparse re orthog1(n, d_coords[i]); } } else { - havePinned = initLayout(graph, n, dim, d_coords, nodes); + havePinned = initLayout(n, dim, d_coords, nodes); } if (Verbose) fprintf(stderr, ": %.2f sec", elapsed_sec()); diff --git a/lib/neatogen/stress.h b/lib/neatogen/stress.h index 3e6467efe..3e18f8150 100644 --- a/lib/neatogen/stress.h +++ b/lib/neatogen/stress.h @@ -54,7 +54,7 @@ extern float *compute_apsp_packed(vtx_data * graph, int n); extern float *compute_apsp_artifical_weights_packed(vtx_data * graph, int n); extern float* circuitModel(vtx_data * graph, int nG); extern float* mdsModel (vtx_data * graph, int nG); -extern int initLayout(vtx_data * graph, int n, int dim, double **coords, node_t** nodes); +extern int initLayout(int n, int dim, double **coords, node_t **nodes); #ifdef __cplusplus } -- 2.40.0