make_map.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*************************************************************************
  2. * Copyright (c) 2011 AT&T Intellectual Property
  3. * All rights reserved. This program and the accompanying materials
  4. * are made available under the terms of the Eclipse Public License v1.0
  5. * which accompanies this distribution, and is available at
  6. * https://www.eclipse.org/legal/epl-v10.html
  7. *
  8. * Contributors: Details at https://graphviz.org
  9. *************************************************************************/
  10. #pragma once
  11. #include <sparse/SparseMatrix.h>
  12. #include <cgraph/cgraph.h>
  13. #include <stdbool.h>
  14. int make_map_from_rectangle_groups(bool include_OK_points, int n, int dim,
  15. double *x, double *sizes, int *grouping,
  16. SparseMatrix graph,
  17. double bounding_box_margin, int nrandom,
  18. int *nart, int nedgep,
  19. double shore_depth_tol, int *nverts,
  20. double **x_poly, SparseMatrix *poly_lines,
  21. SparseMatrix *polys, int **polys_groups,
  22. SparseMatrix *poly_point_map,
  23. SparseMatrix *country_graph,
  24. int highlight_cluster);
  25. void improve_contiguity(int n, int dim, int *grouping, SparseMatrix poly_point_map, double *x, SparseMatrix graph);
  26. void plot_dot_map(Agraph_t* gr, int n, int dim, double *x, SparseMatrix polys,
  27. SparseMatrix poly_lines, double line_width,
  28. const char *line_color, double *x_poly, int *polys_groups,
  29. char **labels, float *fsz, float *r, float *g, float *b,
  30. const char* opacity, SparseMatrix A, FILE*);
  31. void map_optimal_coloring(int seed, SparseMatrix A, float *rgb_r, float *rgb_g, float *rgb_b);
  32. void map_palette_optimal_coloring(char *color_scheme, SparseMatrix A,
  33. float **rgb_r, float **rgb_g, float **rgb_b);
  34. #define neighbor(t, i, edim, elist) elist[(edim)*(t)+i]
  35. #define edge_head(e) edge_table[2*(e)]
  36. #define edge_tail(e) edge_table[2*(e)+1]
  37. #define cycle_prev(e) cycle[2*(e)]
  38. #define cycle_next(e) cycle[2*(e)+1]