Class StronglyConnectedComponents
Defines algorithms that compute strongly connected components.
Inheritance
System.Object
StronglyConnectedComponents
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Flame.Collections
Assembly: Flame.dll
Syntax
public static class StronglyConnectedComponents
Methods
| Improve this Doc 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 |
---|---|---|
System.Collections.Generic.IEnumerable<T> | vertices | The vertices in a graph. |
System.Func<T, System.Collections.Generic.IEnumerable<T>> | getSuccessors | A function that takes a vertex in a graph and computes its successors. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Collections.Generic.HashSet<T>> | A list of strongly connected components. |
Type Parameters
Name | Description |
---|---|
T | The type of a vertex. |