Graphviz 13.1.3~dev.20250827.0805
|
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 <getopt.h>
#include "openFile.h"
#include <util/exit.h>
#include <util/list.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) |
typedef | LIST (Agnode_t *) |
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(), LIST(), and process().
|
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().
typedef LIST | ( | Agnode_t * | ) |
Definition at line 112 of file sccmap.c.
References agbindrec(), agfstout(), aghead, agnode(), agnxtout(), agraphof(), agsubg(), agsubnode(), agwrite(), sccstate::Comp, G, getval(), sccstate::ID, INF, LIST_BACK, LIST_POP_BACK, LIST_PUSH_BACK, sccstate::N_nodes_in_nontriv_SCC, nodeInduce(), outfp, Agnode_s::root, setrep(), setscc(), setval(), StatsOnly, and wantDegenerateComp.
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 LIST().
|
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, LIST_FREE, sccstate::N_nodes_in_nontriv_SCC, NULL, outfp, Silent, StatsOnly, and Verbose.
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 LIST().
Definition at line 66 of file sccmap.c.
References Agnode_s::base, and Agobj_s::data.
Referenced by LIST().
|
static |
Definition at line 73 of file sccmap.c.
References Agnode_s::base, and Agobj_s::data.
Referenced by countComponents(), label(), and LIST().
|
static |
Definition at line 263 of file sccmap.c.
References CmdName, graphviz_exit(), and useString.
|
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 LIST(), process(), and scanArgs().
|
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 LIST(), process(), and scanArgs().
|
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 LIST(), and scanArgs().