28 static void sfdp_init_edge(
edge_t * e)
34 static void sfdp_init_node_edge(
graph_t * g)
46 FIX so that user positions works with multiscale
56 static void sfdp_init_graph(
Agraph_t * g)
65 sfdp_init_node_edge(g);
82 for (ix = 0; ix <
Ndim; ix++) {
83 pos[i * Ndim + ix] =
ND_pos(n)[ix];
98 int n_edge_label_nodes = 0, *edge_label_nodes =
NULL;
109 sizes =
getSizes(g, pad, &n_edge_label_nodes, &edge_label_nodes);
115 pos = getPos(g, ctrl);
141 fprintf(stderr,
"extracted a %d-neighborhood graph of %d edges from a graph of %d edges\n",
142 hops, (DD->
nz)/2, (D->
nz/2));
155 for (i = 0; i <
Ndim; i++) {
164 if (edge_label_nodes)
FREE(edge_label_nodes);
175 if (!sym)
return dflt;
183 else if (isalpha(*s)) {
193 agerr (
AGWARN,
"Unknown value \"%s\" for mode attribute\n", s);
210 if (!sym)
return dflt;
213 #if (HAVE_GTS || HAVE_TRIANGLE)
222 else if (isalpha(*s)) {
231 #if (HAVE_GTS || HAVE_TRIANGLE)
237 #if (HAVE_GTS || HAVE_TRIANGLE)
256 if (!sym)
return dflt;
264 }
else if (isalpha(*s)) {
296 agerr(
AGWARN,
"sfdp only supports start=random\n");
323 doAdjust = (
Ndim == 2);
334 tuneControl (g, ctrl);
335 #if (HAVE_GTS || HAVE_TRIANGLE)
364 sfdpLayout(g, ctrl, hops, pad);
372 for (i = 0; i < ncc; i++) {
375 sfdpLayout(sg, ctrl, hops, pad);
382 for (i = 0; i < ncc; i++) {
392 static void sfdp_cleanup_graph(
graph_t * g)
407 sfdp_cleanup_graph(g);
void dotneato_postprocess(Agraph_t *g)
spring_electrical_control spring_electrical_control_new()
void spring_electrical_control_delete(spring_electrical_control ctrl)
SparseMatrix SparseMatrix_symmetrize_nodiag(SparseMatrix A, int pattern_symmetric_only)
expand_t sepFactor(graph_t *g)
int nodeInduce(Agraph_t *g)
SparseMatrix makeMatrix(Agraph_t *g, int dim, SparseMatrix *D)
void stress_model(int dim, SparseMatrix A, SparseMatrix D, real **x, int edge_len_weighted, int maxit_sm, real tol, int *flag)
CGRAPH_API int agdelete(Agraph_t *g, void *obj)
int agerr(agerrlevel_t level, const char *fmt,...)
void gv_cleanup_edge(Agedge_t *e)
pack_mode getPackInfo(Agraph_t *g, pack_mode dflt, int dfltMargin, pack_info *pinfo)
CGRAPH_API Agraph_t * agroot(void *obj)
CGRAPH_API Agedge_t * agfstout(Agraph_t *g, Agnode_t *n)
#define PS2INCH(a_points)
char * agget(void *obj, char *name)
int user_pos(attrsym_t *posptr, attrsym_t *pinptr, node_t *np, int nG)
CGRAPH_API Agnode_t * agnxtnode(Agraph_t *g, Agnode_t *n)
adjust_data * graphAdjustMode(graph_t *G, adjust_data *dp, char *dflt)
void spring_electrical_control_print(spring_electrical_control ctrl)
void spline_edges(Agraph_t *)
SparseMatrix SparseMatrix_get_real_adjacency_matrix_symmetrized(SparseMatrix A)
void multilevel_spring_electrical_embedding(int dim, SparseMatrix A, SparseMatrix D, spring_electrical_control ctrl, real *node_weights, real *label_sizes, real *x, int n_edge_label_nodes, int *edge_label_nodes, int *flag)
int removeOverlapWith(graph_t *G, adjust_data *am)
boolean mapBool(char *p, boolean dflt)
CGRAPH_API Agnode_t * agfstnode(Agraph_t *g)
int late_int(void *obj, attrsym_t *attr, int def, int low)
void SparseMatrix_delete(SparseMatrix A)
void sfdp_layout(graph_t *g)
int packSubgraphs(int ng, Agraph_t **gs, Agraph_t *root, pack_info *info)
#define agfindgraphattr(g, a)
double late_double(void *obj, attrsym_t *attr, double def, double low)
EXTERN unsigned char Verbose
void gv_cleanup_node(Agnode_t *n)
CGRAPH_API int agnnodes(Agraph_t *g)
int strcasecmp(const char *s1, const char *s2)
int setSeed(graph_t *G, int dflt, long *seedp)
void sfdp_cleanup(graph_t *g)
CGRAPH_API void * agbindrec(void *obj, char *name, unsigned int size, int move_to_front)
SparseMatrix SparseMatrix_distance_matrix_khops(int khops, SparseMatrix D0, int weighted)
int common_init_edge(edge_t *e)
void setEdgeType(graph_t *g, int dflt)
void neato_init_node(node_t *n)
double * getSizes(Agraph_t *g, pointf pad, int *n_elabels, int **elabels)
Agraph_t ** ccomps(Agraph_t *g, int *ncc, char *pfx)
char * agxget(void *obj, Agsym_t *sym)
CGRAPH_API Agedge_t * agnxtout(Agraph_t *g, Agedge_t *e)
#define agfindnodeattr(g, a)