void delete_flat_edge(edge_t * e) { assert(e != NULL); if (ED_to_orig(e) && ED_to_virt(ED_to_orig(e)) == e) ED_to_virt(ED_to_orig(e)) = NULL; zapinlist(&(ND_flat_out(e->tail)), e); zapinlist(&(ND_flat_in(e->head)), e); }
static void dot_init_node(node_t * n) { common_init_node(n); dot_nodesize(n, GD_flip(n->graph)); alloc_elist(4, ND_in(n)); alloc_elist(4, ND_out(n)); alloc_elist(2, ND_flat_in(n)); alloc_elist(2, ND_flat_out(n)); alloc_elist(2, ND_other(n)); ND_UF_size(n) = 1; }
static void dot_cleanup_node(node_t * n) { free_list(ND_in(n)); free_list(ND_out(n)); free_list(ND_flat_out(n)); free_list(ND_flat_in(n)); free_list(ND_other(n)); free_label(ND_label(n)); if (ND_shape(n)) ND_shape(n)->fns->freefn(n); memset(&(n->u), 0, sizeof(Agnodeinfo_t)); }
static void dot_init_node(node_t * n) { agbindrec(n, "Agnodeinfo_t", sizeof(Agnodeinfo_t), TRUE); //graph custom data common_init_node(n); gv_nodesize(n, GD_flip(agraphof(n))); alloc_elist(4, ND_in(n)); alloc_elist(4, ND_out(n)); alloc_elist(2, ND_flat_in(n)); alloc_elist(2, ND_flat_out(n)); alloc_elist(2, ND_other(n)); ND_UF_size(n) = 1; }
static void dot_cleanup_node(node_t * n) { free_list(ND_in(n)); free_list(ND_out(n)); free_list(ND_flat_out(n)); free_list(ND_flat_in(n)); free_list(ND_other(n)); free_label(ND_label(n)); free_label(ND_xlabel(n)); if (ND_shape(n)) ND_shape(n)->fns->freefn(n); agdelrec(n, "Agnodeinfo_t"); }
static void dot_cleanup_node(node_t * n) { free_list(ND_in(n)); free_list(ND_out(n)); free_list(ND_flat_out(n)); free_list(ND_flat_in(n)); free_list(ND_other(n)); free_label(ND_label(n)); if (ND_shape(n)) ND_shape(n)->fns->freefn(n); #ifndef WITH_CGRAPH memset(&(n->u), 0, sizeof(Agnodeinfo_t)); #else /* WITH_CGRAPH */ agclean(agraphof(n), AGNODE,"Agnodeinfo_t"); #endif /* WITH_CGRAPH */ }
edge_t *find_flat_edge(node_t * u, node_t * v) { return ffe(u, ND_flat_out(u), v, ND_flat_in(v)); }
void flat_edge(graph_t * g, edge_t * e) { elist_append(e, ND_flat_out(e->tail)); elist_append(e, ND_flat_in(e->head)); GD_has_flat_edges(g->root) = GD_has_flat_edges(g) = TRUE; }