static void sfdp_init_graph(Agraph_t * g) { int outdim; setEdgeType(g, ET_LINE); outdim = late_int(g, agfindgraphattr(g, "dimen"), 2, 2); GD_ndim(agroot(g)) = late_int(g, agfindgraphattr(g, "dim"), outdim, 2); Ndim = GD_ndim(agroot(g)) = MIN(GD_ndim(agroot(g)), MAXDIM); GD_odim(agroot(g)) = MIN(outdim, Ndim); sfdp_init_node_edge(g); }
void circo_init_graph(graph_t * g) { setEdgeType (g, ET_LINE); /* GD_ndim(g) = late_int(g,agfindattr(g,"dim"),2,2); */ Ndim = GD_ndim(g) = 2; /* The algorithm only makes sense in 2D */ circular_init_node_edge(g); }
static void twopi_init_node(node_t * n) { common_init_node(n); neato_nodesize(n, GD_flip(n->graph)); ND_pos(n) = ALLOC(GD_ndim(n->graph), 0, double); ND_alg(n) = (void *) NEW(rdata); }
/* init_graph: * Initialize attributes. We always do the minimum required by * libcommon. If fill is true, we use init_nop (neato -n) to * read in attributes relevant to the layout. */ static void init_graph(Agraph_t * g, boolean fill) { int d; graph_init(g, FALSE); d = late_int(g, agfindattr(g, "dim"), 2, 2); if (d != 2) { fprintf(stderr, "Error: graph %s has dim = %d (!= 2)\n", g->name, d); exit(1); } Ndim = GD_ndim(g) = 2; init_node_edge(g); if (fill && init_nop(g, 0)) { exit(1); } }
void neato_init_node(node_t * n) { common_init_node(n); ND_pos(n) = ALLOC(GD_ndim(n->graph), 0, double); neato_nodesize(n, GD_flip(n->graph)); }
void twopi_init_graph(graph_t * g) { /* GD_ndim(g) = late_int(g,agfindattr(g,"dim"),2,2); */ Ndim = GD_ndim(g) = 2; /* The algorithm only makes sense in 2D */ twopi_init_node_edge(g); }