Graphviz 13.0.0~dev.20241212.1010
|
extract strongly connected components of directed graphs More...
#include <limits.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <cgraph/cgraph.h>
#include <cgraph/ingraphs.h>
#include <cgraph/list.h>
#include <getopt.h>
#include "openFile.h"
#include <util/exit.h>
#include <util/unreachable.h>
Go to the source code of this file.
Data Structures | |
struct | Agraphinfo_t |
struct | Agnodeinfo_t |
struct | sccstate |
Macros | |
#define | INF UINT_MAX |
Typedefs | |
typedef struct Agraphinfo_t | Agraphinfo_t |
typedef struct Agnodeinfo_t | Agnodeinfo_t |
Functions | |
static Agnode_t * | getrep (Agraph_t *g) |
static void | setrep (Agraph_t *g, Agnode_t *rep) |
static Agraph_t * | getscc (Agnode_t *n) |
static void | setscc (Agnode_t *n, Agraph_t *scc) |
static unsigned | getval (Agnode_t *n) |
static void | setval (Agnode_t *n, unsigned v) |
static void | nodeInduce (Agraph_t *g, Agraph_t *map) |
static unsigned | visit (Agnode_t *n, Agraph_t *map, node_stack_t *sp, sccstate *st) |
static int | label (Agnode_t *n, int nodecnt, int *edgecnt) |
static int | countComponents (Agraph_t *g, int *max_degree, float *nontree_frac) |
static void | process (Agraph_t *G) |
static void | usage (int v) |
static void | scanArgs (int argc, char **argv) |
int | main (int argc, char **argv) |
Variables | |
static int | wantDegenerateComp |
static int | Silent |
static int | StatsOnly |
static int | Verbose |
static char * | CmdName |
static char ** | Files |
static FILE * | outfp |
static char * | useString |
typedef struct Agnodeinfo_t Agnodeinfo_t |
typedef struct Agraphinfo_t Agraphinfo_t |
|
static |
Definition at line 178 of file sccmap.c.
References agdegree(), agfstnode(), agnxtnode(), getval(), label(), and setval().
Referenced by process().
Definition at line 54 of file sccmap.c.
References Agraph_s::base, and Agobj_s::data.
Referenced by nodeInduce().
Definition at line 62 of file sccmap.c.
References Agnode_s::base, and Agobj_s::data.
Referenced by nodeInduce().
|
static |
Definition at line 70 of file sccmap.c.
References Agnode_s::base, and Agobj_s::data.
Referenced by countComponents(), label(), process(), and visit().
|
static |
Definition at line 161 of file sccmap.c.
References agfstedge(), agnxtedge(), agopp, getval(), label(), Agedge_s::node, Agnode_s::root, and setval().
Referenced by compile(), countComponents(), emitEdgeAttrs(), emitNodeAttrs(), glCompLabelDraw(), label(), and mkBlock().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 321 of file sccmap.c.
References agclose(), agisdirected(), agnameof(), fileName(), Files, graphviz_exit(), newIngraph(), nextGraph(), process(), and scanArgs().
Definition at line 91 of file sccmap.c.
References agedge(), agfstnode(), agfstout(), aghead, agnxtnode(), agnxtout(), agroot(), agsubedge(), agsubnode(), agtail, getrep(), getscc(), and NULL.
Referenced by visit().
|
static |
Definition at line 216 of file sccmap.c.
References agclose(), Agdirected, agfstnode(), aginit(), agnedges(), agnnodes(), AGNODE, agnxtnode(), agopen(), AGRAPH, agwrite(), sccstate::Comp, countComponents(), G, getval(), sccstate::ID, sccstate::N_nodes_in_nontriv_SCC, outfp, Silent, StatsOnly, Verbose, and visit().
Referenced by main().
|
static |
Definition at line 269 of file sccmap.c.
References CmdName, Files, NULL, openFile(), outfp, Silent, StatsOnly, UNREACHABLE, usage, Verbose, and wantDegenerateComp.
Referenced by main().
Definition at line 58 of file sccmap.c.
References Agraph_s::base, and Agobj_s::data.
Referenced by visit().
Definition at line 66 of file sccmap.c.
References Agnode_s::base, and Agobj_s::data.
Referenced by visit().
|
static |
Definition at line 73 of file sccmap.c.
References Agnode_s::base, and Agobj_s::data.
Referenced by countComponents(), label(), and visit().
|
static |
Definition at line 263 of file sccmap.c.
References CmdName, graphviz_exit(), and useString.
Definition at line 114 of file sccmap.c.
References agbindrec(), agfstout(), aghead, agnode(), agnxtout(), agraphof(), agsubg(), agsubnode(), agwrite(), G, getval(), INF, nodeInduce(), outfp, setrep(), setscc(), setval(), StatsOnly, visit(), and wantDegenerateComp.
Referenced by process(), and visit().
|
static |
Definition at line 87 of file sccmap.c.
Referenced by scanArgs(), and usage().
|
static |
Definition at line 88 of file sccmap.c.
Referenced by main(), and scanArgs().
|
static |
Definition at line 89 of file sccmap.c.
Referenced by process(), scanArgs(), and visit().
|
static |
Definition at line 84 of file sccmap.c.
Referenced by process(), and scanArgs().
|
static |
Definition at line 85 of file sccmap.c.
Referenced by process(), scanArgs(), and visit().
|
static |
Definition at line 254 of file sccmap.c.
Referenced by usage().
|
static |
Definition at line 86 of file sccmap.c.
Referenced by process(), and scanArgs().
|
static |
Definition at line 83 of file sccmap.c.
Referenced by scanArgs(), and visit().