1CCOMPS(1) General Commands Manual CCOMPS(1)
2
3
4
6 ccomps - connected components filter for graphs
7
9 ccomps [ -sxv? ] [ -ooutfile ] [ files ]
10
12 ccomps decomposes graphs into their connected components, printing the
13 components to standard output.
14
16 The following options are supported:
17
18 -s No output graph is printed. Implies the -v flag.
19
20 -x Only the connected components are printed, as separate graphs.
21
22 -v Counts of nodes, edges and connected components are printed.
23
24 -C Use clusters in computing components in addition to normal edge
25 connectivity. In essence, this gives the connected components of
26 the derived graph in which nodes top-level clusters and nodes in
27 the original graph. This maintains all subgraph structure within
28 a component, even if a subgraph does not contain any nodes.
29
30 -n Do not project subgraph structure. Normally, if ccomps produces
31 components as graphs distinct from the input graph, it will
32 define subgraphs which are projections of subgraphs of the input
33 graph onto the component. (If the projection is empty, no sub‐
34 graph is produced.) If this flag is set, the component contains
35 only the relevant nodes and edges.
36
37 -X node_name
38 Prints only the component containing the node node_name, if any.
39
40 -X# index
41 Prints only component number index, if any, starting at 0.
42
43 -o outfile
44 If specified, each graph will be written to a different file
45 with the names derived from outfile. In particular, if both -o
46 and -x flags are used, then each connected component is written
47 to a different file. If outfile does not have a suffix, the
48 first file will have the name outfile; then next outfile_1, then
49 next outfile_2, and so on. If outfile has a suffix, i.e., has
50 the form base.sfx, then the files will be named base.sfx,
51 base_1.sfx, base_2.sfx, etc.
52
53 By default, each input graph is printed, with each connected component
54 given as a subgraph whose name is a concatenation of the name of the
55 input graph, the string "_component_" and the number of the component.
56
58 The following operand is supported:
59
60 files Names of files containing 1 or more graphs in dot format. If
61 no files operand is specified, the standard input will be used.
62
64 Unless used to extract a single connected component, ccomps returns 0
65 if all the input graphs are connected; and non-zero if any graph has
66 multiple components, or any error occurred. If just extracting a sin‐
67 gle component, ccomps returns 0 on success and non-zero if an error
68 occurred.
69
71 It is possible, though unlikely, that the names used for connected com‐
72 ponents and their subgraphs may conflict with existing subgraph names.
73
75 Stephen C. North <north@research.att.com>
76 Emden R. Gansner <erg@research.att.com>
77
79 gc(1), dot(1), gvpr(1), gvcolor(1), acyclic(1), sccmap(1), tred(1),
80 libgraph(3)
81
82
83
84 21 March 2001 CCOMPS(1)