Graphviz 12.0.1~dev.20240716.0800
|
connected components filter for graphs More...
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <cgraph/agxbuf.h>
#include <cgraph/alloc.h>
#include <cgraph/cgraph.h>
#include <cgraph/gv_ctype.h>
#include <cgraph/ingraphs.h>
#include <cgraph/prisize_t.h>
#include <cgraph/stack.h>
#include <cgraph/unreachable.h>
#include <cgraph/exit.h>
#include <common/render.h>
#include <common/utils.h>
#include <getopt.h>
#include <string.h>
Go to the source code of this file.
Data Structures | |
struct | graphinfo_t |
struct | nodeinfo_t |
Macros | |
#define | GD_cc_subg(g) (((graphinfo_t*)(g->base.data))->cc_subg) |
#define | Node_mark(n) (((nodeinfo_t*)(n->base.data))->mark) |
#define | ND_ptr(n) (((nodeinfo_t*)(n->base.data))->ptr) |
#define | ND_dn(n) ((Agnode_t*)ND_ptr(n)) |
#define | Node_clust(n) ((Agraph_t*)ND_ptr(n)) |
#define | TAG_NODE 1 |
#define | INTERNAL |
#define | EXTERNAL 1 |
#define | SILENT 2 |
#define | EXTRACT 3 |
#define | BY_INDEX 1 |
#define | BY_SIZE 2 |
#define | PFX1 "%s_cc" |
#define | PFX2 "%s_cc_%ld" |
Functions | |
static void | usage (int v) |
static void | split (void) |
static void | init (int argc, char *argv[]) |
static void | push (Agnode_t *np) |
static Agnode_t * | pop (void) |
static int | dfs (Agraph_t *g, Agnode_t *n, Agraph_t *out) |
static char * | getName (void) |
static void | gwrite (Agraph_t *g) |
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) |
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 int | cmp (const void *x, const void *y) |
static void | printSorted (Agraph_t *root, int c_cnt) |
static int | processClusters (Agraph_t *g, char *graphName) |
static void | bindGraphinfo (Agraph_t *g) |
static int | process (Agraph_t *g, char *graphName) |
static char * | chkGraphName (Agraph_t *g) |
int | main (int argc, char *argv[]) |
Variables | |
static char * | Cmd |
static char ** | Inputs |
static int | verbose |
static int | printMode = INTERNAL |
static int | useClusters = 0 |
static int | doEdges = 1 |
static int | doAll = 1 |
static char * | suffix = 0 |
static char * | outfile = 0 |
static char * | rootpath = 0 |
static int | sufcnt = 0 |
static int | sorted = 0 |
static int | sortIndex = 0 |
static int | sortFinal |
static int | x_index = -1 |
static int | x_final = -1 |
static int | x_mode |
static char * | x_node |
static char * | useString |
static gv_stack_t | Stk |
#define GD_cc_subg | ( | g | ) | (((graphinfo_t*)(g->base.data))->cc_subg) |
#define INTERNAL |
#define ND_ptr | ( | n | ) | (((nodeinfo_t*)(n->base.data))->ptr) |
#define Node_mark | ( | n | ) | (((nodeinfo_t*)(n->base.data))->mark) |
|
static |
Definition at line 662 of file ccomps.c.
References agfstsubg(), aginit(), agnxtsubg(), AGRAPH, and bindGraphinfo().
Referenced by bindGraphinfo(), and process().
|
static |
Definition at line 795 of file ccomps.c.
References agnameof(), agxbprint(), and agxbuse().
|
static |
Definition at line 458 of file ccomps.c.
Referenced by add_edges_in_G(), addVertex(), dttree(), dtvsearch(), printSorted(), strview_cmp(), SwigPyObject_Check(), and SwigPyPacked_Check().
Definition at line 371 of file ccomps.c.
References agbindrec(), agfstnode(), agfstsubg(), agnameof(), agnode(), agnxtnode(), agnxtsubg(), deriveClusters(), is_a_cluster(), ND_dn, and ND_ptr.
Referenced by deriveClusters(), and deriveGraph().
Definition at line 401 of file ccomps.c.
References agbindrec(), agedge(), agfstnode(), agfstout(), aghead, agnameof(), agnode(), agnxtnode(), agnxtout(), agopen(), Agstrictundirected, deriveClusters(), ND_dn, and ND_ptr.
Referenced by cccomps(), and processClusters().
Definition at line 245 of file ccomps.c.
Referenced by cccomps(), ccomps(), isConnected(), pccomps(), process(), and processClusters().
|
static |
|
static |
Definition at line 282 of file ccomps.c.
Referenced by printSorted(), process(), and processClusters().
|
static |
Definition at line 237 of file ccomps.c.
Referenced by closesubg(), closesubg(), construct_graph(), dfs(), dfs(), freestack(), freestack(), genTree(), and search_component().
|
static |
Definition at line 483 of file ccomps.c.
References agfstsubg(), agnameof(), agnnodes(), agnxtsubg(), BY_INDEX, BY_SIZE, cmp(), doAll, free(), GD_cc_subg, gv_calloc(), gwrite(), sortFinal, sortIndex, subGInduce(), and x_mode.
Referenced by process(), and processClusters().
|
static |
Definition at line 675 of file ccomps.c.
References agdelete(), agfindnode, agfstnode(), aginit(), agnameof(), agnedges(), agnnodes(), AGNODE, agnxtnode(), AGRAPH, agsubg(), agxbfree(), agxbprint(), agxbuse(), bindGraphinfo(), BY_INDEX, BY_SIZE, dfs(), doAll, doEdges, EXTERNAL, EXTRACT, GD_cc_subg, graphName, graphviz_node_induce(), gwrite(), INTERNAL, Node_mark, out(), PFX1, PFX2, printMode, printSorted(), PRISIZE_T, processClusters(), sorted, subGInduce(), useClusters, verbose, x_final, x_index, x_mode, and x_node.
|
static |
Definition at line 544 of file ccomps.c.
References agclose(), agdelete(), agfindnode, agfstnode(), aginit(), agnameof(), agnedges(), agnnodes(), agnxtnode(), AGRAPH, agsubg(), agxbfree(), agxbprint(), agxbuse(), BY_INDEX, BY_SIZE, deriveGraph(), dfs(), doAll, doEdges, EXTERNAL, EXTRACT, GD_cc_subg, graphName, graphviz_node_induce(), gwrite(), INTERNAL, ND_dn, Node_mark, out(), PFX1, PFX2, printMode, printSorted(), PRISIZE_T, sorted, subGInduce(), unionNodes(), verbose, x_final, x_index, x_mode, and x_node.
Referenced by process().
Definition at line 311 of file ccomps.c.
References agcopyattr(), agfindnode, agfstnode(), agnameof(), agnxtnode(), agsubg(), agsubnode(), doEdges, and graphviz_node_induce().
Referenced by subgInduce().
|
static |
|
static |
Definition at line 108 of file ccomps.c.
Referenced by init(), and Block::splitBetween().
Definition at line 358 of file ccomps.c.
References out(), and subgInduce().
Referenced by cccomps(), printSorted(), process(), and processClusters().
Definition at line 341 of file ccomps.c.
References agfstsubg(), agnxtsubg(), GD_cc_subg, is_a_cluster(), projectG(), subgInduce(), and useClusters.
Referenced by subGInduce(), and subgInduce().
Definition at line 441 of file ccomps.c.
References agfstnode(), AGNODE, agnxtnode(), agsubnode(), AGTYPE, ND_dn, ND_ptr, and Node_clust.
Referenced by cccomps(), and processClusters().
|
static |
Definition at line 102 of file ccomps.c.
References graphviz_exit(), and useString.
|
static |
Definition at line 75 of file ccomps.c.
Referenced by newPos(), printSorted(), process(), processClusters(), and vAdjust().
|
static |
Definition at line 74 of file ccomps.c.
Referenced by neato_layout(), process(), processClusters(), and projectG().
|
static |
Definition at line 72 of file ccomps.c.
Referenced by process(), and processClusters().
|
static |
Definition at line 80 of file ccomps.c.
Referenced by process(), and processClusters().
|
static |
Definition at line 82 of file ccomps.c.
Referenced by printSorted().
|
static |
Definition at line 81 of file ccomps.c.
Referenced by printSorted().
|
static |
Definition at line 73 of file ccomps.c.
Referenced by Import_coord_clusters_from_dot(), process(), and subgInduce().
|
static |
Definition at line 88 of file ccomps.c.
Referenced by usage().
|
static |
Definition at line 71 of file ccomps.c.
Referenced by process(), and processClusters().
|
static |
Definition at line 84 of file ccomps.c.
Referenced by process(), and processClusters().
|
static |
Definition at line 83 of file ccomps.c.
Referenced by process(), and processClusters().
|
static |
Definition at line 85 of file ccomps.c.
Referenced by printSorted(), process(), and processClusters().
|
static |
Definition at line 86 of file ccomps.c.
Referenced by process(), and processClusters().