[ library(graph_algorithms) | Reference Manual | Alphabetic Index ]
connected_components(+Graph, -ConnectedComponents)
Computes the connected components of graph
- Graph
- a graph structure
- ConnectedComponents
- a list of lists of node numbers
Description
Computes the connected components of a (bidirected) graph. Each resulting
connected component is represented as an (unsorted) list of nodes.
This operation is only defined on bidirected graphs.
The runtime complexity is O(Nnodes + Nedges).
Modes and Determinism
- connected_components(+, -) is det
See Also
graph_is_bidirected / 1, articulation_points / 2