networks[components] - find the connected components of a graph
|
Calling Sequence
|
|
components(G)
components(G, root=v)
|
|
Parameters
|
|
G
|
-
|
graph
|
v
|
-
|
vertex of G
|
|
|
|
|
Description
|
|
•
|
The components of the graph G are returned as a set of sets. The number of sets indicates the number of components while the elements of the sets indicate the vertices belonging to each component.
|
•
|
If a second argument of the form root=v is given, then only the single component containing the vertex v is constructed.
|
•
|
A set of subgraphs corresponding to each component can be constructed by mapping induce() onto the set of components.
|
•
|
This routine is normally loaded via the command with(networks) but may also be referenced using the full name networks[components](...).
|
|
|
Download Help Document
Was this information helpful?