76 for (ix = 0; ix <
Ndim; ix++) {
91 int n_edge_label_nodes = 0, *edge_label_nodes =
NULL;
96 sizes =
getSizes(g, pad, &n_edge_label_nodes, &edge_label_nodes);
108 for (i = 0; i <
Ndim; i++) {
116 free(edge_label_nodes);
126 if (!sym)
return dflt;
129#if (defined(HAVE_GTS) || defined(HAVE_TRIANGLE))
139 if (!strcasecmp(
s,
"avg_dist"))
141 else if (!strcasecmp(
s,
"graph_dist"))
143 else if (!strcasecmp(
s,
"none"))
145 else if (!strcasecmp(
s,
"power_dist"))
147#if (defined(HAVE_GTS) || defined(HAVE_TRIANGLE))
148 else if (!strcasecmp(
s,
"rng"))
151 else if (!strcasecmp(
s,
"spring"))
153#if (defined(HAVE_GTS) || defined(HAVE_TRIANGLE))
154 else if (!strcasecmp(
s,
"triangle"))
172 if (!sym)
return dflt;
181 if (!strcasecmp(
s,
"none") || !strcasecmp(
s,
"false") ){
183 }
else if (!strcasecmp(
s,
"normal") || !strcasecmp(
s,
"true") || !strcasecmp(
s,
"yes")){
185 }
else if (!strcasecmp(
s,
"fast")){
209 agwarningf(
"sfdp only supports start=random\n");
233 doAdjust = (
Ndim == 2);
243#if (defined(HAVE_GTS) || defined(HAVE_TRIANGLE))
281 for (
size_t i = 0; i < ncc; i++) {
291 for (
size_t i = 0; i < ncc; i++) {
void SparseMatrix_delete(SparseMatrix A)
SparseMatrix makeMatrix(Agraph_t *g)
expand_t sepFactor(graph_t *g)
double * getSizes(Agraph_t *g, pointf pad, int *n_elabels, int **elabels)
Set up array of half sizes in inches.
void graphAdjustMode(graph_t *G, adjust_data *dp, char *dflt)
int removeOverlapWith(graph_t *G, adjust_data *am)
Memory allocation wrappers that exit on failure.
static void * gv_calloc(size_t nmemb, size_t size)
abstract graph C library, Cgraph API
bool mapbool(const char *p)
void setEdgeType(graph_t *g, int defaultValue)
int late_int(void *obj, attrsym_t *attr, int defaultValue, int minimum)
double late_double(void *obj, attrsym_t *attr, double defaultValue, double minimum)
void common_init_edge(edge_t *e)
bool mapBool(const char *p, bool defaultValue)
static void init(int argc, char *argv[], double *angle, double *accuracy, int *check_edges_with_same_endpoint, int *seed, const char **color_scheme, int *lightness)
#define PS2INCH(a_points)
int agnnodes(Agraph_t *g)
size_t graphviz_node_induce(Agraph_t *g, Agraph_t *edgeset)
char * agget(void *obj, char *name)
char * agxget(void *obj, Agsym_t *sym)
Agedge_t * agfstout(Agraph_t *g, Agnode_t *n)
Agedge_t * agnxtout(Agraph_t *g, Agedge_t *e)
void agwarningf(const char *fmt,...)
#define agfindgraphattr(g, a)
Agnode_t * agnxtnode(Agraph_t *g, Agnode_t *n)
Agnode_t * agfstnode(Agraph_t *g)
#define agfindnodeattr(g, a)
int agdelete(Agraph_t *g, void *obj)
deletes object. Equivalent to agclose, agdelnode, and agdeledge for obj being a graph,...
Agraph_t * agroot(void *obj)
void * agbindrec(void *obj, const char *name, unsigned int recsize, int move_to_front)
attaches a new record of the given size to the object
replacements for ctype.h functions
static bool gv_isdigit(int c)
static bool gv_isalpha(int c)
Agraph_t ** ccomps(Agraph_t *g, size_t *ncc, char *pfx)
int setSeed(graph_t *G, int dflt, long *seedp)
void neato_init_node(node_t *n)
NEATOPROCS_API void spline_edges(Agraph_t *)
int packSubgraphs(size_t ng, Agraph_t **gs, Agraph_t *root, pack_info *info)
pack_mode getPackInfo(Agraph_t *g, pack_mode dflt, int dfltMargin, pack_info *pinfo)
support for connected components
void dotneato_postprocess(Agraph_t *g)
void gv_cleanup_edge(Agedge_t *e)
void gv_cleanup_node(Agnode_t *n)
static void sfdp_init_node_edge(graph_t *g)
static void sfdp_init_graph(Agraph_t *g)
void sfdp_cleanup(graph_t *g)
static void sfdp_init_edge(edge_t *e)
static int late_smooth(graph_t *g, Agsym_t *sym, int dflt)
void sfdp_layout(graph_t *g)
static double * getPos(Agraph_t *g)
static void sfdpLayout(graph_t *g, spring_electrical_control ctrl, pointf pad)
static void tuneControl(graph_t *g, spring_electrical_control ctrl)
static int late_quadtree_scheme(graph_t *g, Agsym_t *sym, int dflt)
void spring_electrical_control_print(spring_electrical_control ctrl)
spring_electrical_control spring_electrical_control_new(void)
void multilevel_spring_electrical_embedding(int dim, SparseMatrix A0, spring_electrical_control ctrl, double *label_sizes, double *x, int n_edge_label_nodes, int *edge_label_nodes, int *flag)
void spring_electrical_control_delete(spring_electrical_control ctrl)
@ SMOOTHING_STRESS_MAJORIZATION_GRAPH_DIST
@ SMOOTHING_STRESS_MAJORIZATION_POWER_DIST
@ SMOOTHING_STRESS_MAJORIZATION_AVG_DIST
platform abstraction for case-insensitive string functions
bool doSplines
use splines in constructing graph shape