biconnected components filter for graphs
More...
#include "config.h"
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <getopt.h>
#include <stdlib.h>
#include <cgraph/agxbuf.h>
#include <cgraph/alloc.h>
#include <cgraph/cgraph.h>
#include <cgraph/exit.h>
#include <cgraph/gv_math.h>
#include <cgraph/ingraphs.h>
#include <cgraph/stack.h>
#include <cgraph/unreachable.h>
Go to the source code of this file.
|
static char * | blockName (agxbuf *xb, char *gname, int d) |
|
static char * | getName (int ng, int nb) |
|
static void | gwrite (Agraph_t *g, int ng, int nb) |
|
static Agraph_t * | mkBlock (Agraph_t *g, bcstate *stp) |
|
static void | dfs (Agraph_t *g, Agnode_t *u, bcstate *stp, Agnode_t *parent) |
|
static void | addCutPts (Agraph_t *tree, Agraph_t *blk) |
|
static int | process (Agraph_t *g, int gcnt) |
|
static void | usage (int v) |
|
static void | split (char *name) |
|
static void | init (int argc, char *argv[]) |
|
int | main (int argc, char *argv[]) |
|
◆ Cut
◆ Low
◆ NEXTBLK
#define NEXTBLK |
( |
|
g | ) |
(((Agraphinfo_t*)(g->base.data))->next) |
◆ addCutPts()
◆ blockName()
static char * blockName |
( |
agxbuf * |
xb, |
|
|
char * |
gname, |
|
|
int |
d |
|
) |
| |
|
static |
◆ dfs()
Definition at line 153 of file bcomps.c.
References agfstedge(), aghead, agnxtedge(), agsubnode(), agtail, bcstate::count, Cut, dfs(), imin(), Low, mkBlock(), N, parent, stack_pop(), stack_push(), and bcstate::stk.
Referenced by dfs(), and process().
◆ getName()
static char * getName |
( |
int |
ng, |
|
|
int |
nb |
|
) |
| |
|
static |
◆ gwrite()
static void gwrite |
( |
Agraph_t * |
g, |
|
|
int |
ng, |
|
|
int |
nb |
|
) |
| |
|
static |
◆ init()
static void init |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
|
static |
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
◆ mkBlock()
◆ process()
static int process |
( |
Agraph_t * |
g, |
|
|
int |
gcnt |
|
) |
| |
|
static |
Definition at line 203 of file bcomps.c.
References addCutPts(), agclose(), AGEDGE, agfstnode(), aginit(), agnameof(), AGNODE, agnxtnode(), agopen(), AGRAPH, Agstrictundirected, Cut, dfs(), doTree, external, graphviz_node_induce(), gwrite(), N, NEXTBLK, stack_reset(), state, tree, and verbose.
Referenced by main().
◆ split()
static void split |
( |
char * |
name | ) |
|
|
static |
◆ usage()
static void usage |
( |
int |
v | ) |
|
|
static |
◆ doTree
◆ external
◆ Files
◆ outfile
◆ path
◆ silent
◆ suffix
◆ useString
Initial value:=
"Usage: bcomps [-stvx?] [-o<out template>] <files>\n\
-o - output file template\n\
-s - don't print components\n\
-t - emit block-cutpoint tree\n\
-v - verbose\n\
-x - external\n\
-? - print usage\n\
If no files are specified, stdin is used\n"
Definition at line 259 of file bcomps.c.
Referenced by usage().
◆ verbose