CCOMPS(1)
πΈ NAME πΈ
okay so bestie, meet ccomps(1) β the connected components filter for graphs β coming at you from the General Commands Manual. she takes your graph apart into its connected components and it's honestly iconic. π«Ά
β¨ SYNOPSIS β¨
ccomps [ -sxvenzC? ] [ -X[#%]s[-f] ] [ -ooutfile ] [ files ]
π¦ DESCRIPTION π¦
ccomps decomposes graphs into their connected components, printing the components to standard output. that's it, that's the whole vibe. π
π OPTIONS π
The following options are supported:
-eβ Do not induce edges in the connected components. just... don't bring the edges along, periodt.-sβ No output graph is printed. the return value can be used to check if the graph is connected or not. lowkey a yes/no machine. π₯-xβ Only the connected components are printed, as separate graphs.-vβ Counts of nodes, edges and connected components are printed. she's giving stats. β¨-zβ Sort components by size, with the largest first. this is only effective if either-xor-X#is present. Thus,-zX#0will cause the largest component to be printed. biggest first, main character energy only. π-Cβ Use clusters in computing components in addition to normal edge connectivity. In essence, this gives the connected components of the derived graph in which nodes top-level clusters and nodes in the original graph. This maintains all subgraph structure within a component, even if a subgraph does not contain any nodes.-nβ Do not project subgraph structure. Normally, ifccompsproduces components as graphs distinct from the input graph, it will define subgraphs which are projections of subgraphs of the input graph onto the component. (If the projection is empty, no subgraph is produced.) If this flag is set, the component contains only the relevant nodes and edges. so like, no projecting, just the bare facts. π-Xnode_name β Prints only the component containing the node node_name, if any. one node, one component, that's your girl. π-X#start-X#start--X#start-last- Prints only components in the given range of indices. In the first form, only the component whose index is start, if any, is printed. In the second form, each component whose index is at least start is printed. In the last form, only those components whose indices are in the range [start,last] are printed. Thus, the flag
-xis equivalent to-X#0-. index math, slay.
- Prints only components in the given range of indices. In the first form, only the component whose index is start, if any, is printed. In the second form, each component whose index is at least start is printed. In the last form, only those components whose indices are in the range [start,last] are printed. Thus, the flag
-X%min-X%min--X%min-max- Prints only components in the given range of sizes. In the first form, only a component whose size is min, if any, is printed. In the second form, each component whose size is at least min is printed. In the last form, only those components whose sizes are in the range [min,max] are printed.
-ooutfile β If specified, each graph will be written to a different file with the names derived from outfile. In particular, if both-oand-xflags are used, then each connected component is written to a different file. If outfile does not have a suffix, the first file will have the name outfile; then next outfile_1, then next outfile_2, and so on. If outfile has a suffix, i.e., has the form base.sfx, then the files will be named base.sfx, base_1.sfx, base_2.sfx, etc. one file per component, we love a filing system. ποΈ
By default, each input graph is printed, with each connected component given as a subgraph whose name is a concatenation of the name of the input graph, the string "_cc_" and the number of the component. iykyk. π
π§ OPERANDS π§
The following operand is supported:
- files β Names of files containing 1 or more graphs in dot format. If no files operand is specified, the standard input will be used. no files? she'll just read from stdin, she's flexible like that. π
β RETURN CODES β
Unless used to extract a single connected component, ccomps returns 0 if all the input graphs are connected; and non-zero if any graph has multiple components, or any error occurred. If just extracting a single component, ccomps returns 0 on success and non-zero if an error occurred.
fr fr, keep an eye on that exit status. 0 means connected (or a clean single-component extraction), non-zero means either multiple components showed up or something went sideways. π
π BUGS π
It is possible, though unlikely, that the names used for connected components and their subgraphs may conflict with existing subgraph names.
not a drill bestie, just a possible naming collision β unlikely, but she's being honest with you. π
π AUTHORS π
- Stephen C. North
<north@research.att.com> - Emden R. Gansner
<erg@research.att.com>
π SEE ALSO π
gc(1), dot(1), gvpr(1), gvcolor(1), acyclic(1), sccmap(1), tred(1), libgraph(3)
okay that's the whole page, bestie π this was CCOMPS(1) from the General Commands Manual, and the version/date stamp on this baddie is 30 April 2011 β so she's been slaying since 2011 and still ate. periodt. πβ¨
π¦ where this page comes from
- alpine 3.22: graphviz-doc 12.2.1-r0 Β· EPL-1.0
- alpine 3.23: graphviz-doc 12.2.1-r0 Β· EPL-1.0
- alpine 3.24: graphviz-doc 12.2.1-r3 Β· EPL-1.0
- arch rolling: graphviz 16.1.0-2 Β· EPL
- fedora 43: graphviz 13.1.1-3.fc43 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 43: graphviz 13.1.1-3.fc43 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 43: graphviz 13.1.2-3.fc43 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 43: graphviz 13.1.2-3.fc43 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 44: graphviz 14.1.2-2.fc44 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 44: graphviz 14.1.2-2.fc44 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 44: graphviz 14.1.4-2.fc44 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 44: graphviz 14.1.4-2.fc44 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- nixos 26.05: graphviz 12.2.1
- nixpkgs unstable: graphviz 15.1.1
- opensuse-leap 16.0: graphviz 12.2.1-160000.1.1 Β· EPL-1.0
- opensuse-leap 16.0: graphviz 12.2.1-160000.1.1 Β· EPL-1.0
- opensuse-leap 16.0: graphviz 12.2.1-160000.1.1 Β· EPL-1.0
- opensuse-leap 16.0: graphviz 12.2.1-160000.1.1 Β· EPL-1.0
- ubuntu resolute: graphviz-tools 14.1.2-1ubuntu1 Β· EPL-1.0
- ubuntu stonking: graphviz-tools 14.1.2-1ubuntu2 Β· EPL-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms