Class StronglyConnectedComponents
Defines algorithms that compute strongly connected components.
Inherited Members
Namespace: Flame.Collections
Assembly: Flame.dll
Syntax
public static class StronglyConnectedComponents
Methods
| Edit this page View SourceCompute<T>(IEnumerable<T>, Func<T, IEnumerable<T>>)
Computes all strongly connected components in a graph.
Declaration
public static IReadOnlyList<HashSet<T>> Compute<T>(IEnumerable<T> vertices, Func<T, IEnumerable<T>> getSuccessors)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<T> | vertices | The vertices in a graph. |
| Func<T, IEnumerable<T>> | getSuccessors | A function that takes a vertex in a graph and computes its successors. |
Returns
| Type | Description |
|---|---|
| IReadOnlyList<HashSet<T>> | A list of strongly connected components. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of a vertex. |