stronglyConnectedSubgraphs

fun <V, E> stronglyConnectedSubgraphs(graph: DirectedGraph<V, E>, includeSingletons: Boolean): List<DirectedGraph<V, E>>(source)

Identifies strongly connected subgraphs within the given directed graph.

Return

a list of directed subgraphs that represent strongly connected components of the input graph. Each subgraph corresponds to one strongly connected component.

Parameters

graph

the directed graph to analyze for strongly connected components.

includeSingletons

a boolean indicating whether to include single-vertex subgraphs as strongly connected subgraphs.

Type Parameters

V

the type of vertices in the graph.

E

the type of edges in the graph.