Graphviz 13.0.0~dev.20241220.2304
|
count graph components More...
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <cgraph/cgraph.h>
#include <cgraph/cghdr.h>
#include <cgraph/ingraphs.h>
#include <cgraph/list.h>
#include <common/render.h>
#include <common/utils.h>
#include <util/exit.h>
#include <getopt.h>
Go to the source code of this file.
Data Structures | |
struct | nodeinfo_t |
Macros | |
#define | ND_dfs_mark(n) (((nodeinfo_t*)(n->base.data))->dfs_mark) |
#define | NODES 1 |
#define | EDGES 2 |
#define | CC 4 |
#define | CL 8 |
#define | DIRECTED 1 |
#define | UNDIRECTED 2 |
#define | GTYPE(g) (agisdirected(g)?DIRECTED:UNDIRECTED) |
Functions | |
static void | usage (int v) |
static void | init (int argc, char *argv[]) |
static void | push (Agnode_t *np) |
static Agnode_t * | pop (void) |
static void | cc_dfs (Agraph_t *g, Agnode_t *n) |
static void | cntCluster (Agraph_t *g, Agobj_t *sg, void *arg) |
static int | cc_decompose (Agraph_t *g) |
static void | ipr (long num) |
static void | wcp (int nnodes, int nedges, int ncc, int ncl, char *gname, char *filename) |
static void | emit (Agraph_t *g, int root, int cl_count) |
static int | eval (Agraph_t *g, int root) |
int | main (int argc, char *argv[]) |
Variables | |
static int | tot_edges |
static int | tot_nodes |
static int | tot_cc |
static int | tot_cl |
static int | n_graphs |
static int | n_indent |
static int | recurse |
static int | silent |
static int | verbose |
static int | gtype |
static int | flags |
static char * | fname |
static char ** | Inputs |
static FILE * | outfile |
static char * | useString |
static node_stack_t | Stk |
#define GTYPE | ( | g | ) | (agisdirected(g)?DIRECTED:UNDIRECTED) |
#define ND_dfs_mark | ( | n | ) | (((nodeinfo_t*)(n->base.data))->dfs_mark) |
|
static |
Definition at line 195 of file gc.c.
References agfstnode(), agnxtnode(), cc_dfs(), and ND_dfs_mark.
Referenced by emit().
Definition at line 168 of file gc.c.
References agfstedge(), aghead, agnxtedge(), agtail, ND_dfs_mark, pop(), and push().
Referenced by cc_decompose().
|
static |
Definition at line 241 of file gc.c.
References agnameof(), agnedges(), agnnodes(), CC, cc_decompose(), CL, flags, fname, n_graphs, tot_cc, tot_cl, tot_edges, tot_nodes, and wcp().
Referenced by eval().
|
static |
Definition at line 270 of file gc.c.
References agapply(), agfstsubg(), aginit(), AGNODE, agnxtsubg(), CL, cntCluster(), emit(), eval(), flags, gtype, GTYPE, n_indent, and recurse.
Referenced by eval(), iterativePCA_1D(), main(), usage(), usage(), usage(), usage(), and usage().
|
static |
|
static |
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 296 of file gc.c.
References agclose(), agnameof(), eval(), fileName(), fname, graphviz_exit(), init(), Inputs, n_graphs, newIngraph(), nextGraph(), NULL, prev, Stk, tot_cc, tot_cl, tot_edges, tot_nodes, verbose, and wcp().
|
static |
|
static |
Definition at line 154 of file gc.c.
References ND_dfs_mark, and Stk.
Referenced by cc_dfs().
|
static |
Definition at line 81 of file gc.c.
References graphviz_exit(), and useString.
|
static |
|
static |
Definition at line 61 of file gc.c.
Referenced by compileProg(), doFlags(), EmbedText(), emit(), emit_begin_edge(), emit_begin_node(), emit_clusters(), emit_edge_label(), emit_graph(), emit_map_rect(), emit_page(), emit_view(), errorv(), estimate_textspan_size(), eval(), exsub(), get_gradient_points(), grpmatch(), gv_fopen(), gvputs_xml(), init(), initMapData(), map_label(), map_point(), onematch(), pango_textlayout(), parseStyle(), sfprint(), sfvscanf(), strgrpmatch(), svg_begin_anchor(), svg_textspan(), SWIG_ConvertPtr(), SWIG_ConvertPtrAndOwn(), SWIG_Guile_ConvertPtr(), SWIG_Guile_MustGetPtr(), SWIG_Lua_ConvertPtr(), SWIG_Lua_MustGetPtr(), SWIG_Perl_ConvertPtr(), SWIG_Perl_ConvertPtrAndOwn(), SWIG_Perl_MakePtr(), SWIG_Perl_NewPointerObj(), SWIG_Python_ConvertPtrAndOwn(), SWIG_Python_MustGetPtr(), SWIG_Python_NewPointerObj(), SWIG_Ruby_ConvertPtrAndOwn(), SWIG_Ruby_NewPointerObj(), SWIG_Tcl_ConvertPtr(), SWIG_Tcl_ConvertPtrFromString(), SWIG_Tcl_NewInstanceObj(), SWIG_Tcl_NewPointerObj(), wcp(), xdot_textspan(), xml_core(), xml_escape(), xml_puts(), xml_puts(), xml_url_puts(), and xml_url_puts().
|
static |
|
static |
Definition at line 66 of file gc.c.
Referenced by usage().