]> granicus.if.org Git - graphviz/commitdiff
remove unused plot_edges
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 17 Mar 2021 02:18:32 +0000 (19:18 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 29 Mar 2021 02:04:23 +0000 (19:04 -0700)
cmd/gvmap/make_map.c
cmd/gvmap/make_map.h

index 82cca2b2de2ced3b58ca4739a85259fc6b6bb3b2..ab610163e3d24973821f27127434dc674359649e 100644 (file)
@@ -453,37 +453,6 @@ void plot_labels(int n, int dim, real *x, char **labels){
 
 }
 
-void plot_edges(int n, int dim, real *x, SparseMatrix A){
-  int i, j, k;
-  int *ia, *ja;
-
-  if (!A) {
-    printf("Graphics[{}]");
-    return;
-  }
-  ia = A->ia; ja = A->ja;
-
-  printf("Graphics[(* edges of the graph*){");
-  for (i = 0; i < n; i++){
-    for (j = ia[i]; j < ia[i+1]; j++){
-      if (i > 0 && j == ia[i]) printf(",");;
-      printf("Line[{{");
-      for (k = 0; k < 2; k++) {
-       printf("%f",x[i*dim+k]);
-       if (k == 0) printf(",");
-      }
-      printf("},{");
-      for (k = 0; k < 2; k++) {
-       printf("%f",x[ja[j]*dim+k]);
-       if (k == 0) printf(",");
-      }
-      printf("}}]");
-      if (j < ia[i+1] - 1) printf(",");
-    }
-  }
-  printf("}(* end of edges of the graph*)]");
-
-}
 static SparseMatrix get_country_graph(int n, SparseMatrix A, int *groups, int GRP_RANDOM, int GRP_BBOX){
   /* form a graph each vertex is a group (a country), and a vertex is connected to another if the two countryes shares borders.
    since the group ID may not be contigous (e.g., only groups 2,3,5, -1), we will return NULL if one of the group has non-positive ID! */
index e953550fd147bf273561f7270807a2a7092c8791..9ba54571d5e51bd4a1399918be0f4b2f5388400c 100644 (file)
@@ -22,7 +22,6 @@ int make_map_from_rectangle_groups(int exclude_random, int include_OK_points, in
 
 void improve_contiguity(int n, int dim, int *grouping, SparseMatrix poly_point_map, real *x, SparseMatrix graph);
 
-void plot_edges(int n, int dim, real *x, SparseMatrix A);
 void plot_labels(int n, int dim, real *x, char **labels);
 
 void plot_dot_map(Agraph_t* gr, int n, int dim, real *x, SparseMatrix polys, SparseMatrix poly_lines, real line_width, char *line_color, real *x_poly, int *polys_groups, char **labels, float *fsz, float *r, float *g, float *b, char* opacity, SparseMatrix A, FILE*);