wolffd@0: .TH CCOMPS 1 "27 August 2008" wolffd@0: .SH NAME wolffd@0: ccomps \- connected components filter for graphs wolffd@0: .SH SYNOPSIS wolffd@0: .B ccomps wolffd@0: [ wolffd@0: .B \-sxvnzC? wolffd@0: ] wolffd@0: [ wolffd@0: .BI -X [#]v wolffd@0: ] wolffd@0: [ wolffd@0: .BI -o outfile wolffd@0: ] wolffd@0: [ wolffd@0: .I files wolffd@0: ] wolffd@0: .SH DESCRIPTION wolffd@0: .B ccomps wolffd@0: decomposes graphs into their connected components, wolffd@0: printing the components to standard output. wolffd@0: .SH OPTIONS wolffd@0: The following options are supported: wolffd@0: .TP wolffd@0: .B \-s wolffd@0: No output graph is printed. The return value can be used to wolffd@0: check if the graph is connected or not. wolffd@0: .TP wolffd@0: .B \-x wolffd@0: Only the connected components are printed, as separate graphs. wolffd@0: .TP wolffd@0: .B \-v wolffd@0: Counts of nodes, edges and connected components are printed. wolffd@0: .TP wolffd@0: .B \-z wolffd@0: Sort components by size, with the largest first. This is only wolffd@0: effective if either \fB-x\fP or \fB-X#v\fP is present. wolffd@0: Thus, \fB-zX#0\fP will cause the largest component to be printed. wolffd@0: .TP wolffd@0: .B \-C wolffd@0: Use clusters in computing components in addition to normal edge wolffd@0: connectivity. In essence, this gives the connected components of the wolffd@0: derived graph in which nodes top-level clusters and nodes in the wolffd@0: original graph. This maintains all subgraph structure within a wolffd@0: component, even if a subgraph does not contain any nodes. wolffd@0: .TP wolffd@0: .B \-n wolffd@0: Do not project subgraph structure. Normally, if wolffd@0: .B ccomps wolffd@0: produces components as graphs distinct from the input graph, it will wolffd@0: define subgraphs which are projections of subgraphs of the input graph wolffd@0: onto the component. (If the projection is empty, no subgraph is produced.) wolffd@0: If this flag is set, the component contains only the relevant nodes and wolffd@0: edges. wolffd@0: .TP wolffd@0: .BI \-X " node_name" wolffd@0: Prints only the component containing the node \fInode_name\fP, wolffd@0: if any. wolffd@0: .TP wolffd@0: .BI \-X# " index" wolffd@0: Prints only component number \fIindex\fP, if any, starting at 0. wolffd@0: .TP wolffd@0: .BI \-o " outfile" wolffd@0: If specified, each graph will be written to a different file wolffd@0: with the names derived from \fIoutfile\fP. In particular, wolffd@0: if both \fB-o\fP and \fB-x\fP flags are used, then each connected wolffd@0: component is written to a different file. If \fIoutfile\fP does wolffd@0: not have a suffix, the first file will have the name \fIoutfile\fP; wolffd@0: then next \fIoutfile_1\fP, then next \fIoutfile_2\fP, and so on. wolffd@0: If \fIoutfile\fP has a suffix, i.e., has the form \fIbase.sfx\fP, wolffd@0: then the files will be named \fIbase.sfx\fP, \fIbase_1.sfx\fP, wolffd@0: \fIbase_2.sfx\fP, etc. wolffd@0: .LP wolffd@0: By default, each input graph is printed, with each connected wolffd@0: component given as a subgraph whose name is a concatenation of wolffd@0: the name of the input graph, the string "_component_" and the wolffd@0: number of the component. wolffd@0: .SH OPERANDS wolffd@0: The following operand is supported: wolffd@0: .TP 8 wolffd@0: .I files wolffd@0: Names of files containing 1 or more graphs in dot format. wolffd@0: If no wolffd@0: .I files wolffd@0: operand is specified, wolffd@0: the standard input will be used. wolffd@0: .SH RETURN CODES wolffd@0: Unless used to extract a single connected component, wolffd@0: .B ccomps wolffd@0: returns wolffd@0: .B 0 wolffd@0: if all the input graphs are connected; and wolffd@0: non-zero if any graph has multiple components, or any error occurred. wolffd@0: If just extracting a single component, wolffd@0: .B ccomps wolffd@0: returns wolffd@0: .B 0 wolffd@0: on success and non-zero if an error occurred. wolffd@0: .SH "BUGS" wolffd@0: It is possible, though unlikely, that the names used for connected wolffd@0: components and their subgraphs may conflict with existing subgraph names. wolffd@0: .SH AUTHORS wolffd@0: Stephen C. North wolffd@0: .br wolffd@0: Emden R. Gansner wolffd@0: .SH "SEE ALSO" wolffd@0: gc(1), dot(1), gvpr(1), gvcolor(1), acyclic(1), sccmap(1), tred(1), libgraph(3)