Graphviz 13.0.0~dev.20241220.2304
|
#include <sparse/general.h>
#include <sparse/DotIO.h>
#include <sparse/clustering.h>
#include <math.h>
#include <sparse/mq.h>
#include <sparse/color_palette.h>
#include <sparse/colorutil.h>
#include <stdbool.h>
#include <string.h>
#include <util/agxbuf.h>
#include <util/alloc.h>
#include <util/startswith.h>
#include <util/unreachable.h>
Go to the source code of this file.
Data Structures | |
struct | Agnodeinfo_t |
Macros | |
#define | STANDALONE |
#define | ND_id(n) (((Agnodeinfo_t*)((n)->base.data))->id) |
Functions | |
static void | color_string (agxbuf *buf, int dim, double *color) |
void | attach_edge_colors (Agraph_t *g, int dim, double *colors) |
SparseMatrix | SparseMatrix_import_dot (Agraph_t *g, int dim, double **x, int format) |
int | Import_dot_splines (Agraph_t *g, int *ne, char ***xsplines) |
static int | hex2int (char h) |
static float | hexcol2rgb (const char *h) |
void | Dot_SetClusterColor (Agraph_t *g, float *rgb_r, float *rgb_g, float *rgb_b, int *clusters) |
SparseMatrix | Import_coord_clusters_from_dot (Agraph_t *g, int maxcluster, int dim, int *nn, double **label_sizes, double **x, int **clusters, float **rgb_r, float **rgb_g, float **rgb_b, float **fsz, char ***labels, int default_color_scheme, int clustering_scheme, int useClusters) |
void | attached_clustering (Agraph_t *g, int maxcluster, int clustering_scheme) |
void | initDotIO (Agraph_t *g) |
void | setDotNodeID (Agnode_t *n, int v) |
int | getDotNodeID (Agnode_t *n) |
#define ND_id | ( | n | ) | (((Agnodeinfo_t*)((n)->base.data))->id) |
void attach_edge_colors | ( | Agraph_t * | g, |
int | dim, | ||
double * | colors | ||
) |
Definition at line 50 of file DotIO.c.
References agattr(), AGEDGE, agfstnode(), agfstout(), aghead, agnxtnode(), agnxtout(), agxbfree(), agxbuse(), agxset(), color_string(), dim, ND_id, and row.
Referenced by edge_distinct_coloring().
void attached_clustering | ( | Agraph_t * | g, |
int | maxcluster, | ||
int | clustering_scheme | ||
) |
Definition at line 566 of file DotIO.c.
References A, agattr(), AGEDGE, agfstnode(), agfstout(), aghead, agnedges(), agnnodes(), AGNODE, agnxtnode(), agnxtout(), agxbfree(), agxbprint(), agxbuse(), agxget(), agxset(), CLUSTERING_MODULARITY, CLUSTERING_MQ, free(), gv_calloc(), I, MATRIX_TYPE_REAL, modularity_clustering(), mq_clustering(), ND_id, nedges, NULL, row, SparseMatrix_delete(), SparseMatrix_from_coordinate_arrays(), type, UNREACHABLE, and Verbose.
Referenced by clusterGraph().
|
static |
Definition at line 33 of file DotIO.c.
References agxbprint(), color(), dim, and MIN.
Referenced by attach_edge_colors().
void Dot_SetClusterColor | ( | Agraph_t * | g, |
float * | rgb_r, | ||
float * | rgb_g, | ||
float * | rgb_b, | ||
int * | clusters | ||
) |
Definition at line 268 of file DotIO.c.
References agattr(), agfstnode(), AGNODE, agnxtnode(), agxbfree(), agxbuse(), agxset(), ND_id, NULL, and rgb2hex().
Referenced by makeMap().
int getDotNodeID | ( | Agnode_t * | n | ) |
|
static |
Definition at line 257 of file DotIO.c.
Referenced by hexcol2rgb().
|
static |
Definition at line 264 of file DotIO.c.
References hex2int().
Referenced by Import_coord_clusters_from_dot().
SparseMatrix Import_coord_clusters_from_dot | ( | Agraph_t * | g, |
int | maxcluster, | ||
int | dim, | ||
int * | nn, | ||
double ** | label_sizes, | ||
double ** | x, | ||
int ** | clusters, | ||
float ** | rgb_r, | ||
float ** | rgb_g, | ||
float ** | rgb_b, | ||
float ** | fsz, | ||
char *** | labels, | ||
int | default_color_scheme, | ||
int | clustering_scheme, | ||
int | useClusters | ||
) |
Definition at line 287 of file DotIO.c.
References A, agattr(), AGEDGE, agfstnode(), agfstout(), agfstsubg(), agget(), aghead, agnameof(), agnedges(), agnnodes(), AGNODE, agnxtnode(), agnxtout(), agnxtsubg(), agxget(), agxset(), CLUSTERING_MODULARITY, CLUSTERING_MQ, color(), COLOR_OK, COLOR_SCHEME_ADAM, COLOR_SCHEME_ADAM_BLEND, COLOR_SCHEME_BLUE_YELLOW, COLOR_SCHEME_GREY, COLOR_SCHEME_GREY_RED, COLOR_SCHEME_NONE, COLOR_SCHEME_PASTEL, COLOR_SCHEME_PRIMARY, COLOR_SCHEME_SEQUENTIAL_SINGLEHUE_RED, COLOR_SCHEME_SEQUENTIAL_SINGLEHUE_RED_LIGHTER, COLOR_SCHEME_WHITE_RED, colorxlate(), dim, free(), gv_calloc(), hexcol2rgb(), I, MATRIX_TYPE_REAL, MAX, MAX_COLOR, MIN, modularity_clustering(), mq_clustering(), ND_id, nedges, NULL, palette_adam, palette_adam_blend, palette_blue_to_yellow, palette_grey, palette_grey_to_red, palette_pastel, palette_primary, palette_sequential_singlehue_red, palette_sequential_singlehue_red_lighter, palette_white_to_red, POINTS, RGBA_DOUBLE, row, SparseMatrix_from_coordinate_arrays(), startswith(), type, UNREACHABLE, useClusters, and Verbose.
Referenced by mapFromGraph().
int Import_dot_splines | ( | Agraph_t * | g, |
int * | ne, | ||
char *** | xsplines | ||
) |
Definition at line 217 of file DotIO.c.
References agattr(), AGEDGE, agfstnode(), agfstout(), agnedges(), agnxtnode(), agnxtout(), agxget(), gv_calloc(), ND_id, and nedges.
Referenced by edge_distinct_coloring().
void initDotIO | ( | Agraph_t * | g | ) |
Definition at line 652 of file DotIO.c.
References aginit(), and AGNODE.
Referenced by bundle(), clarify(), clusterGraph(), and mapFromGraph().
void setDotNodeID | ( | Agnode_t * | n, |
int | v | ||
) |
SparseMatrix SparseMatrix_import_dot | ( | Agraph_t * | g, |
int | dim, | ||
double ** | x, | ||
int | format | ||
) |
Definition at line 80 of file DotIO.c.
References A, agattr(), AGEDGE, agerrorf(), agfstnode(), agfstout(), aghead, agnameof(), agnedges(), agnnodes(), AGNODE, agnxtnode(), agnxtout(), agxget(), dim, format, FORMAT_COORD, FORMAT_CSR, free(), graphviz_exit(), gv_calloc(), I, MATRIX_TYPE_REAL, ND_id, nedges, NULL, row, SparseMatrix_delete(), SparseMatrix_from_coordinate_arrays(), SparseMatrix_new(), and type.
Referenced by bundle(), and edge_distinct_coloring().