From b87d1475e2049680a53fa3abc3a9536f6b0f7aa4 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Mon, 28 Jun 2021 20:15:26 -0700 Subject: [PATCH] remove unused norm_1 output parameter to country_graph_coloring --- cmd/gvmap/country_graph_coloring.c | 5 +++-- cmd/gvmap/country_graph_coloring.h | 2 +- cmd/gvmap/make_map.c | 3 +-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/gvmap/country_graph_coloring.c b/cmd/gvmap/country_graph_coloring.c index fd314f759..a706f9e08 100644 --- a/cmd/gvmap/country_graph_coloring.c +++ b/cmd/gvmap/country_graph_coloring.c @@ -162,6 +162,7 @@ static void country_graph_coloring_internal(int seed, SparseMatrix A, int **p, r if (A2 != A) SparseMatrix_delete(A2); SparseMatrix_delete(L); } -void country_graph_coloring(int seed, SparseMatrix A, int **p, real *norm_1){ - country_graph_coloring_internal(seed, A, p, norm_1); +void country_graph_coloring(int seed, SparseMatrix A, int **p){ + real norm_1; + country_graph_coloring_internal(seed, A, p, &norm_1); } diff --git a/cmd/gvmap/country_graph_coloring.h b/cmd/gvmap/country_graph_coloring.h index 9d8a0d476..45cb1469e 100644 --- a/cmd/gvmap/country_graph_coloring.h +++ b/cmd/gvmap/country_graph_coloring.h @@ -13,7 +13,7 @@ #include -void country_graph_coloring(int seed, SparseMatrix A, int **p, real *norm_1); +void country_graph_coloring(int seed, SparseMatrix A, int **p); void improve_antibandwidth_by_swapping(SparseMatrix A, int *p); diff --git a/cmd/gvmap/make_map.c b/cmd/gvmap/make_map.c index f40e4bb97..a593e228b 100644 --- a/cmd/gvmap/make_map.c +++ b/cmd/gvmap/make_map.c @@ -90,9 +90,8 @@ void map_optimal_coloring(int seed, SparseMatrix A, float *rgb_r, float *rgb_g, float *u = NULL; int n = A->m; int i; - real norm1; - country_graph_coloring(seed, A, &p, &norm1); + country_graph_coloring(seed, A, &p); rgb_r++; rgb_b++; rgb_g++;/* seems necessary, but need to better think about cases when clusters are not contiguous */ vector_float_take(n, rgb_r, n, p, &u); -- 2.40.0