From b5232173df20e50b9c09322ae69b7b0632d64a10 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 20 Jun 2021 12:01:06 -0700 Subject: [PATCH] remove commented out code in node_distinct_coloring.c --- lib/edgepaint/node_distinct_coloring.c | 27 -------------------------- 1 file changed, 27 deletions(-) diff --git a/lib/edgepaint/node_distinct_coloring.c b/lib/edgepaint/node_distinct_coloring.c index 8e61c4dea..f16995fdc 100644 --- a/lib/edgepaint/node_distinct_coloring.c +++ b/lib/edgepaint/node_distinct_coloring.c @@ -44,7 +44,6 @@ static void node_distinct_coloring_internal2(int scheme, QuadTree qt, int weight real red[3], black[3], min; int flag = 0, imin; real *wgt = NULL; - //int iter2 = 0, iter_max2; assert(accuracy > 0); max_level = MAX(1, -log(accuracy)/log(2.)); @@ -104,40 +103,16 @@ static void node_distinct_coloring_internal2(int scheme, QuadTree qt, int weight srand(seed); for (i = 0; i < n*cdim; i++) colors[i] = cspace_size*drand(); - /* better way... not using it for now till paper is out */ - /* - if (scheme != COLOR_LAB){ - for (i = 0; i < n*cdim; i++) colors[i] = cspace_size*drand(); - } else { - for (i = 0; i < n; i++) { - colors[3*i] = 100*drand(); - colors[3*i+1] = 256*drand() - 128; - colors[3*i+2] = 256*drand() - 128; - } - } - */ - x = MALLOC(sizeof(real)*cdim*n); if (weightedQ) wgt = MALLOC(sizeof(real)*n); color_diff = 0; color_diff_old = -1; color_diff_sum = 0; color_diff_sum_old = -1; - /* - {FILE *fp; - char buf[10000]; - fp = fopen("/tmp/count","r"); - fgets(buf, 10000, fp); - sscanf(buf,"%d",&iter_max2); - fprintf(stderr,"count=%d\n", iter_max2); - } - */ - while (iter++ < iter_max && (color_diff > color_diff_old || (color_diff == color_diff_old && color_diff_sum > color_diff_sum_old))){ color_diff_old = color_diff; color_diff_sum_old = color_diff_sum; for (i = 0; i < n; i++){ - // if (iter2++ >= iter_max2) goto CONT; k = 0; for (j = ia[i]; j < ia[i+1]; j++){ if (ja[j] == i) continue; @@ -165,8 +140,6 @@ static void node_distinct_coloring_internal2(int scheme, QuadTree qt, int weight if (Verbose) fprintf(stderr,"iter ---- %d ---, color_diff = %f, color_diff_sum = %f\n", iter, color_diff, color_diff_sum); } - // CONT: - if (scheme == COLOR_LAB){ /* convert from LAB to RGB */ color_rgb rgb; -- 2.40.0