From 7709d50b05f95727d09c7ab8f84bd40e836715f5 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sat, 26 Nov 2022 09:33:41 -0800 Subject: [PATCH] sfdpgen spring_electrical_embedding_slow: remove 'counts_avg' that is always 0 --- lib/sfdpgen/spring_electrical.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/sfdpgen/spring_electrical.c b/lib/sfdpgen/spring_electrical.c index 82d32a720..aaed66787 100644 --- a/lib/sfdpgen/spring_electrical.c +++ b/lib/sfdpgen/spring_electrical.c @@ -661,7 +661,6 @@ static void spring_electrical_embedding_slow(int dim, SparseMatrix A0, spring_el int iter = 0; int adaptive_cooling = ctrl->adaptive_cooling; QuadTree qt = NULL; - double counts_avg = 0; double *force; #ifdef TIME clock_t start, end, start0, start2; @@ -778,14 +777,13 @@ static void spring_electrical_embedding_slow(int dim, SparseMatrix A0, spring_el if (qt) { QuadTree_delete(qt); - counts_avg /= n; #ifdef TIME qtree_cpu0 = qtree_cpu - qtree_cpu0; if (Verbose && 0) fprintf(stderr, "\n cpu this outer iter = %f, quadtree time = %f other time = %f\n",((double) (clock() - start2)) / CLOCKS_PER_SEC, qtree_cpu0,((double) (clock() - start2))/CLOCKS_PER_SEC - qtree_cpu0); qtree_cpu0 = qtree_cpu; #endif - if (Verbose && 0) fprintf(stderr, "nsuper_avg=0, counts_avg = %f 2*nsuper+counts=%f\n",counts_avg, counts_avg); - oned_optimizer_train(qtree_level_optimizer, counts_avg); + if (Verbose && 0) fprintf(stderr, "nsuper_avg=0, counts_avg = 0 2*nsuper+counts=0\n"); + oned_optimizer_train(qtree_level_optimizer, 0); } #ifdef ENERGY -- 2.40.0