Main Content

Connected graph components

returns the connected components of
graph `bins`

= conncomp(`G`

)`G`

as bins. The bin numbers indicate which component each
node in the graph belongs to.

If

`G`

is an undirected graph, then two nodes belong to the same component if there is a path connecting them.If

`G`

is a directed graph, then two nodes belong to the same strong component only if there is a path connecting them in both directions.

uses additional options specified by one or more Name-Value pair arguments. For
example, `bins`

= conncomp(`G`

,`Name,Value`

)`conncomp(G,'OutputForm','cell')`

returns a cell array to
describe the connected components.