1CCOMPS(1)                   General Commands Manual                  CCOMPS(1)
2
3
4

NAME

6       ccomps - connected components filter for graphs
7

SYNOPSIS

9       ccomps [ -sxvenzC?  ] [ -X[#%]s[-f] ] [ -ooutfile ] [ files ]
10

DESCRIPTION

12       ccomps  decomposes graphs into their connected components, printing the
13       components to standard output.
14

OPTIONS

16       The following options are supported:
17
18       -e     Do not induce edges in the connected components.
19
20       -s     No output graph is printed. The return  value  can  be  used  to
21              check if the graph is connected or not.
22
23       -x     Only the connected components are printed, as separate graphs.
24
25       -v     Counts of nodes, edges and connected components are printed.
26
27       -z     Sort  components  by  size, with the largest first. This is only
28              effective if either -x or -X#  is  present.   Thus,  -zX#0  will
29              cause the largest component to be printed.
30
31       -C     Use  clusters in computing components in addition to normal edge
32              connectivity. In essence, this gives the connected components of
33              the derived graph in which nodes top-level clusters and nodes in
34              the original graph. This maintains all subgraph structure within
35              a component, even if a subgraph does not contain any nodes.
36
37       -n     Do  not project subgraph structure. Normally, if ccomps produces
38              components as graphs distinct from  the  input  graph,  it  will
39              define subgraphs which are projections of subgraphs of the input
40              graph onto the component. (If the projection is empty,  no  sub‐
41              graph is produced.)  If this flag is set, the component contains
42              only the relevant nodes and edges.
43
44       -X node_name
45              Prints only the component containing the node node_name, if any.
46
47       -X# start
48
49       -X# start-
50
51       -X# start-last
52              Prints only components in the given range  of  indices.  In  the
53              first  form, only the component whose index is start, if any, is
54              printed.  In the second form, each component whose index  is  at
55              least  start is printed. In the last form, only those components
56              whose indices are in the range [Istart,last] are printed.  Thus,
57              the flag -x is equivalent to -X#0-.
58
59       -X% min
60
61       -X% min-
62
63       -X% min-max
64              Prints only components in the given range of sizes. In the first
65              form, only a component whose size is min, if  any,  is  printed.
66              In the second form, each component whose size is at least min is
67              printed. In the last form, only those components whose sizes are
68              in the range [Imin,max] are printed.
69
70       -o outfile
71              If  specified,  each  graph  will be written to a different file
72              with the names derived from outfile. In particular, if  both  -o
73              and  -x flags are used, then each connected component is written
74              to a different file. If outfile does  not  have  a  suffix,  the
75              first file will have the name outfile; then next outfile_1, then
76              next outfile_2, and so on.  If outfile has a suffix,  i.e.,  has
77              the  form  base.sfx,  then  the  files  will  be named base.sfx,
78              base_1.sfx, base_2.sfx, etc.
79
80       By default, each input graph is printed, with each connected  component
81       given  as  a  subgraph whose name is a concatenation of the name of the
82       input graph, the string "_cc_" and the number of the component.
83

OPERANDS

85       The following operand is supported:
86
87       files   Names of files containing 1 or more graphs in dot  format.   If
88               no files operand is specified, the standard input will be used.
89

RETURN CODES

91       Unless  used  to extract a single connected component, ccomps returns 0
92       if all the input graphs are connected; and non-zero if  any  graph  has
93       multiple  components, or any error occurred.  If just extracting a sin‐
94       gle component, ccomps returns 0 on success and  non-zero  if  an  error
95       occurred.
96

BUGS

98       It is possible, though unlikely, that the names used for connected com‐
99       ponents and their subgraphs may conflict with existing subgraph names.
100

AUTHORS

102       Stephen C. North <north@research.att.com>
103       Emden R. Gansner <erg@research.att.com>
104

SEE ALSO

106       gc(1), dot(1), gvpr(1),  gvcolor(1),  acyclic(1),  sccmap(1),  tred(1),
107       libgraph(3)
108
109
110
111                                 30 April 2011                       CCOMPS(1)
Impressum