From 11ef34b94986c0c434bcad6c091f8832d7dc05ff Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Mon, 23 May 2022 19:44:34 -0700 Subject: [PATCH] sfdpgen: remove 'node_weights' from 'Multilevel_new' This parameter is always passed as `NULL`. --- lib/sfdpgen/Multilevel.c | 4 ++-- lib/sfdpgen/Multilevel.h | 2 +- lib/sfdpgen/spring_electrical.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/sfdpgen/Multilevel.c b/lib/sfdpgen/Multilevel.c index dfef1e1e0..2c661d0af 100644 --- a/lib/sfdpgen/Multilevel.c +++ b/lib/sfdpgen/Multilevel.c @@ -1170,7 +1170,7 @@ static Multilevel Multilevel_establish(Multilevel grid, Multilevel_control ctrl) } -Multilevel Multilevel_new(SparseMatrix A0, SparseMatrix D0, double *node_weights, Multilevel_control ctrl){ +Multilevel Multilevel_new(SparseMatrix A0, SparseMatrix D0, Multilevel_control ctrl){ /* A: the weighting matrix. D: the distance matrix, could be NULL. If not null, the two matrices must have the same sparsity pattern */ Multilevel grid; SparseMatrix A = A0, D = D0; @@ -1181,7 +1181,7 @@ Multilevel Multilevel_new(SparseMatrix A0, SparseMatrix D0, double *node_weights if (D && (!SparseMatrix_is_symmetric(D, false) || D->type != MATRIX_TYPE_REAL)){ D = SparseMatrix_symmetrize_nodiag(D); } - grid = Multilevel_init(A, D, node_weights); + grid = Multilevel_init(A, D, NULL); grid = Multilevel_establish(grid, ctrl); if (A != A0) grid->delete_top_level_A = TRUE;/* be sure to clean up later */ return grid; diff --git a/lib/sfdpgen/Multilevel.h b/lib/sfdpgen/Multilevel.h index b501c50be..7826857a3 100644 --- a/lib/sfdpgen/Multilevel.h +++ b/lib/sfdpgen/Multilevel.h @@ -54,7 +54,7 @@ void Multilevel_control_delete(Multilevel_control ctrl); void Multilevel_delete(Multilevel grid); -Multilevel Multilevel_new(SparseMatrix A, SparseMatrix D, double *node_weights, Multilevel_control ctrl); +Multilevel Multilevel_new(SparseMatrix A, SparseMatrix D, Multilevel_control ctrl); Multilevel Multilevel_get_coarsest(Multilevel grid); diff --git a/lib/sfdpgen/spring_electrical.c b/lib/sfdpgen/spring_electrical.c index 3b55ffaf6..7bbcaf3c6 100644 --- a/lib/sfdpgen/spring_electrical.c +++ b/lib/sfdpgen/spring_electrical.c @@ -1987,7 +1987,7 @@ static void multilevel_spring_electrical_embedding_core(int dim, SparseMatrix A0 mctrl = Multilevel_control_new(ctrl->multilevel_coarsen_scheme, ctrl->multilevel_coarsen_mode); mctrl->maxlevel = ctrl->multilevels; - grid0 = Multilevel_new(A, D, NULL, mctrl); + grid0 = Multilevel_new(A, D, mctrl); grid = Multilevel_get_coarsest(grid0); if (Multilevel_is_finest(grid)){ -- 2.40.0