From 72e845b5ab84d857785a0ed09bcdff2f715e12e0 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 19 May 2021 17:51:06 -0700 Subject: [PATCH] remove commented out code in make_map.c --- cmd/gvmap/make_map.c | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/cmd/gvmap/make_map.c b/cmd/gvmap/make_map.c index 7057cef3a..be1fc3d62 100644 --- a/cmd/gvmap/make_map.c +++ b/cmd/gvmap/make_map.c @@ -70,7 +70,6 @@ void map_palette_optimal_coloring(char *color_scheme, char *lightness, SparseMat SparseMatrix_export(stdout, A); } - // A = SparseMatrix_multiply(A0, A0); node_distinct_coloring(color_scheme, lightness, weightedQ, A, accuracy, iter_max, seed, &cdim, &colors, &color_diff, &color_diff_sum, &flag); if (A != A0){ @@ -120,7 +119,6 @@ void improve_contiguity(int n, int dim, int *grouping, SparseMatrix poly_point_m . If j < n, it is the original point, otherwise it is artificial point (forming the rectangle around a label) or random points. */ int i, j, *ia, *ja, u, v; - //int *ib, *jb; real *a; SparseMatrix point_poly_map, D; real dist; @@ -137,23 +135,11 @@ void improve_contiguity(int n, int dim, int *grouping, SparseMatrix poly_point_m /* point_poly_map: each row i has only 1 entry at column j, which says that point i is in polygon j */ point_poly_map = SparseMatrix_transpose(poly_point_map); - // ib = point_poly_map->ia; - // jb = point_poly_map->ja; - - for (i = 0; i < n; i++){ u = i; for (j = ia[i]; j < ia[i+1]; j++){ v = ja[j]; dist = distance_cropped(x, dim, u, v); - /* - if ((grouping[u] != grouping[v]) || (get_poly_id(u, point_poly_map) == get_poly_id(v, point_poly_map))){ - a[j] = 1.1*dist; - } else { - nbad++; - a[j] = 0.9*dist; - } - */ if (grouping[u] != grouping[v]){ a[j] = 1.1*dist; } else if (get_poly_id(u, point_poly_map) == get_poly_id(v, point_poly_map)){ @@ -350,7 +336,6 @@ void plot_dot_map(Agraph_t* gr, int n, int dim, real *x, SparseMatrix polys, Spa agattr(gr, AGRAPH, "outputorder", "edgesfirst"); agattr(gr, AGRAPH, "bgcolor", "#dae2ff"); if (!A) agattr(gr, AGEDGE, "style","invis");/* do not plot edges */ - // agedgeattr(gr, "color", "#55555515"); } /*polygons */ @@ -531,7 +516,6 @@ static void get_poly_lines(int exclude_random, int nt, SparseMatrix graph, Spars ipoly = 1; for (i = 0; i < ncomps; i++){ - /*fprintf(stderr, "comp %d has %d members\n",i, comps_ptr[i+1]-comps_ptr[i]);*/ nnt = 0; for (j = comps_ptr[i]; j < comps_ptr[i+1]; j++){ ii = comps[j]; @@ -548,12 +532,7 @@ static void get_poly_lines(int exclude_random, int nt, SparseMatrix graph, Spars /* always skip bounding box */ if (groups[ii] == GRP_BBOX) continue; - /*fprintf(stderr, "member %d is in group %d, it is\n",ii, groups[ii]);*/ for (jj = ie[ii]; jj < ie[ii+1]; jj++){ - /* - fprintf(stderr, "connected with %d in group %d\n",je[jj], groups[je[jj]]); - fprintf(stderr, "jj=%d nz = %d je[jj]=%d je[jj+1]=%d\n",jj,nz, je[jj],je[jj+1]); - */ if (groups[je[jj]] != groups[ii] && jj < nz - 1 && je[jj] == je[jj+1]){/* an triangle edge neighboring 2 triangles and two ends not in the same groups */ t1 = e[jj]; t2 = e[jj+1]; @@ -1468,16 +1447,10 @@ int make_map_from_rectangle_groups(int exclude_random, int include_OK_points, } else if (shore_depth_tol == 0){ real area; get_boundingbox(n, dim, x, sizes, bbox); - //shore_depth_tol = MIN(bbox[1] - bbox[0], bbox[3] - bbox[2])*0.05; area = (bbox[1] - bbox[0])*(bbox[3] - bbox[2]); shore_depth_tol = sqrt(area/(real) n); if (Verbose) fprintf(stderr,"setting shore length ======%f\n",shore_depth_tol); } else { - /* - get_boundingbox(n, dim, x, sizes, bbox); - shore_depth_tol = MIN(bbox[1] - bbox[0], bbox[3] - bbox[2])*shore_depth_tol; - */ - } /* add artificial points in an anti-clockwise fashion */ -- 2.50.1