Graphviz 13.0.0~dev.20241212.1010
|
#include <cgraph/cgraph.h>
#include <cgraph/list.h>
#include <common/render.h>
#include <common/utils.h>
#include <limits.h>
#include <pack/pack.h>
#include <stdbool.h>
#include <stdlib.h>
#include <util/agxbuf.h>
#include <util/alloc.h>
#include <util/gv_ctype.h>
#include <util/prisize_t.h>
Go to the source code of this file.
Data Structures | |
struct | stk_t |
struct | ccgraphinfo_t |
struct | ccgnodeinfo_t |
struct | orig_t |
Macros | |
#define | GRECNAME "ccgraphinfo" |
#define | NRECNAME "ccgnodeinfo" |
#define | GD_cc_subg(g) (((ccgraphinfo_t *)aggetrec(g, GRECNAME, 0))->cc_subg) |
#define | dnodeOf(v) (((ccgnodeinfo_t *)aggetrec(v, NRECNAME, 0))->ptr.n) |
#define | dnodeSet(v, w) (((ccgnodeinfo_t *)aggetrec(v, NRECNAME, 0))->ptr.n = w) |
#define | ptrOf(np) (((ccgnodeinfo_t *)((np)->base.data))->ptr.v) |
#define | nodeOf(np) (((ccgnodeinfo_t *)((np)->base.data))->ptr.n) |
#define | clustOf(np) (((ccgnodeinfo_t *)((np)->base.data))->ptr.g) |
#define | clMark(n) (((ccgnodeinfo_t *)(n->base.data))->mark) |
#define | ORIG_REC "orig" |
Functions | |
static bool | marked (const stk_t *stk, Agnode_t *n) |
does n have a mark set? | |
static void | mark (const stk_t *stk, Agnode_t *n) |
set a mark on n | |
static void | unmark (const stk_t *stk, Agnode_t *n) |
unset a mark on n | |
static void | initStk (stk_t *sp, void(*actionfn)(Agnode_t *, void *), bool(*markfn)(Agnode_t *, int)) |
static void | freeStk (stk_t *sp) |
static void | push (stk_t *sp, Agnode_t *np) |
static Agnode_t * | pop (stk_t *sp) |
static size_t | dfs (Agraph_t *g, Agnode_t *n, void *state, stk_t *stk) |
static bool | isLegal (const char *p) |
static void | insertFn (Agnode_t *n, void *state) |
static bool | markFn (Agnode_t *n, int v) |
static void | setPrefix (agxbuf *xb, const char *pfx) |
Agraph_t ** | pccomps (Agraph_t *g, size_t *ncc, char *pfx, bool *pinned) |
Agraph_t ** | ccomps (Agraph_t *g, size_t *ncc, char *pfx) |
static void | deriveClusters (Agraph_t *dg, Agraph_t *g) |
static Agraph_t * | deriveGraph (Agraph_t *g) |
static void | unionNodes (Agraph_t *dg, Agraph_t *g) |
static bool | clMarkFn (Agnode_t *n, int v) |
Agraph_t * | mapClust (Agraph_t *cl) |
static Agraph_t * | projectG (Agraph_t *subg, Agraph_t *g, int inCluster) |
static void | subgInduce (Agraph_t *root, Agraph_t *g, int inCluster) |
static void | subGInduce (Agraph_t *g, Agraph_t *out) |
Agraph_t ** | cccomps (Agraph_t *g, size_t *ncc, char *pfx) |
int | isConnected (Agraph_t *g) |
#define clMark | ( | n | ) | (((ccgnodeinfo_t *)(n->base.data))->mark) |
#define clustOf | ( | np | ) | (((ccgnodeinfo_t *)((np)->base.data))->ptr.g) |
#define dnodeOf | ( | v | ) | (((ccgnodeinfo_t *)aggetrec(v, NRECNAME, 0))->ptr.n) |
#define dnodeSet | ( | v, | |
w | |||
) | (((ccgnodeinfo_t *)aggetrec(v, NRECNAME, 0))->ptr.n = w) |
#define GD_cc_subg | ( | g | ) | (((ccgraphinfo_t *)aggetrec(g, GRECNAME, 0))->cc_subg) |
#define nodeOf | ( | np | ) | (((ccgnodeinfo_t *)((np)->base.data))->ptr.n) |
#define ptrOf | ( | np | ) | (((ccgnodeinfo_t *)((np)->base.data))->ptr.v) |
Definition at line 439 of file ccomps.c.
References agbindrec(), agclean(), agclose(), agdelete(), agfstnode(), aginit(), agnameof(), agnedges(), agnnodes(), AGNODE, agnxtnode(), AGRAPH, agsubg(), agxbfree(), agxbprint(), agxbuse(), clMarkFn(), deriveGraph(), dfs(), freeStk(), GD_cc_subg, graphviz_node_induce(), GRECNAME, initStk(), insertFn(), marked(), NRECNAME, NULL, out(), PRISIZE_T, setPrefix(), subGInduce(), unionNodes(), and Verbose.
Referenced by doDot().
Definition at line 187 of file ccomps.c.
References agbindrec(), agfstnode(), agnnodes(), agnxtnode(), agsubg(), agxbfree(), agxbprint(), agxbuse(), dfs(), freeStk(), initStk(), insertFn(), marked(), markFn(), NULL, out(), PRISIZE_T, setPrefix(), and unmark().
Referenced by circomps(), main(), sfdp_layout(), and twopi_layout().
|
static |
Definition at line 264 of file ccomps.c.
References agbindrec(), agfstnode(), agfstsubg(), agnameof(), agnode(), agnxtnode(), agnxtsubg(), clustOf, deriveClusters(), dnodeOf, dnodeSet, is_a_cluster(), and NRECNAME.
Definition at line 294 of file ccomps.c.
References agbindrec(), agedge(), agfstnode(), agfstout(), aghead, agnameof(), agnode(), agnxtnode(), agnxtout(), agopen(), Agstrictundirected, deriveClusters(), dnodeOf, dnodeSet, nodeOf, NRECNAME, and NULL.
Definition at line 63 of file ccomps.c.
References stk_t::actionfn, agfstedge(), aghead, agnxtedge(), agtail, cnt(), marked(), pop(), and push().
|
static |
Definition at line 48 of file ccomps.c.
References stk_t::data.
Referenced by cccomps(), ccomps(), isConnected(), and pccomps().
|
static |
Definition at line 41 of file ccomps.c.
References stk_t::actionfn, stk_t::data, and stk_t::markfn.
Referenced by cccomps(), ccomps(), isConnected(), and pccomps().
|
static |
int isConnected | ( | Agraph_t * | g | ) |
Definition at line 508 of file ccomps.c.
References agfstnode(), agnnodes(), agnxtnode(), cnt(), dfs(), freeStk(), initStk(), markFn(), NULL, and unmark().
|
static |
Definition at line 83 of file ccomps.c.
References gv_isalnum().
Referenced by setPrefix().
Definition at line 366 of file ccomps.c.
References aggetrec(), orig_t::orig, and ORIG_REC.
Referenced by copyCluster(), and copyClusterInfo().
Definition at line 36 of file ccomps.c.
References stk_t::markfn.
Referenced by find_pair_edges(), marktripath(), and push().
|
static |
Definition at line 125 of file ccomps.c.
References agbindrec(), agfstnode(), agnnodes(), agnxtnode(), agsubg(), agxbfree(), agxbprint(), agxbuse(), dfs(), freeStk(), initStk(), insertFn(), isPinned, marked(), markFn(), NULL, out(), PRISIZE_T, setPrefix(), and unmark().
Referenced by neato_layout().
Definition at line 55 of file ccomps.c.
References stk_t::data, and NULL.
Definition at line 380 of file ccomps.c.
References agbindrec(), agcopyattr(), agfindnode, agfstnode(), agnameof(), agnxtnode(), agsubg(), agsubnode(), graphviz_node_induce(), is_a_cluster(), NULL, orig_t::orig, and ORIG_REC.
Definition at line 50 of file ccomps.c.
References stk_t::data, and mark().
|
static |
Definition at line 428 of file ccomps.c.
References out(), and subgInduce().
Definition at line 413 of file ccomps.c.
References agfstsubg(), agnxtsubg(), GD_cc_subg, is_a_cluster(), projectG(), and subgInduce().
Definition at line 334 of file ccomps.c.
References agfstnode(), AGNODE, agnxtnode(), agsubnode(), AGTYPE, clustOf, nodeOf, and ptrOf.
Definition at line 39 of file ccomps.c.
References stk_t::markfn.
Referenced by ccomps(), isConnected(), and pccomps().