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

NAME

6       ccomps - connected components filter for graphs
7

SYNOPSIS

9       ccomps [ -sxvnzC?  ] [ -X[#]v ] [ -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       -s     No output graph is printed. The return  value  can  be  used  to
19              check if the graph is connected or not.
20
21       -x     Only the connected components are printed, as separate graphs.
22
23       -v     Counts of nodes, edges and connected components are printed.
24
25       -z     Sort  components  by  size, with the largest first. This is only
26              effective if either -x or -X#v is  present.   Thus,  -zX#0  will
27              cause the largest component to be printed.
28
29       -C     Use  clusters in computing components in addition to normal edge
30              connectivity. In essence, this gives the connected components of
31              the derived graph in which nodes top-level clusters and nodes in
32              the original graph. This maintains all subgraph structure within
33              a component, even if a subgraph does not contain any nodes.
34
35       -n     Do  not project subgraph structure. Normally, if ccomps produces
36              components as graphs distinct from  the  input  graph,  it  will
37              define subgraphs which are projections of subgraphs of the input
38              graph onto the component. (If the projection is empty,  no  sub‐
39              graph is produced.)  If this flag is set, the component contains
40              only the relevant nodes and edges.
41
42       -X node_name
43              Prints only the component containing the node node_name, if any.
44
45       -X# index
46              Prints only component number index, if any, starting at 0.
47
48       -o outfile
49              If specified, each graph will be written  to  a  different  file
50              with  the  names derived from outfile. In particular, if both -o
51              and -x flags are used, then each connected component is  written
52              to  a  different  file.  If  outfile does not have a suffix, the
53              first file will have the name outfile; then next outfile_1, then
54              next  outfile_2,  and so on.  If outfile has a suffix, i.e., has
55              the form base.sfx,  then  the  files  will  be  named  base.sfx,
56              base_1.sfx, base_2.sfx, etc.
57
58       By  default, each input graph is printed, with each connected component
59       given as a subgraph whose name is a concatenation of the  name  of  the
60       input graph, the string "_component_" and the number of the component.
61

OPERANDS

63       The following operand is supported:
64
65       files   Names  of  files containing 1 or more graphs in dot format.  If
66               no files operand is specified, the standard input will be used.
67

RETURN CODES

69       Unless used to extract a single connected component, ccomps  returns  0
70       if  all  the  input graphs are connected; and non-zero if any graph has
71       multiple components, or any error occurred.  If just extracting a  sin‐
72       gle  component,  ccomps  returns  0 on success and non-zero if an error
73       occurred.
74

BUGS

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

AUTHORS

80       Stephen C. North <north@research.att.com>
81       Emden R. Gansner <erg@research.att.com>
82

SEE ALSO

84       gc(1),  dot(1),  gvpr(1),  gvcolor(1),  acyclic(1), sccmap(1), tred(1),
85       libgraph(3)
86
87
88
89                                27 August 2008                       CCOMPS(1)
Impressum