Method | Description | |
---|---|---|
IterativeSort ( IEnumerable nodes, Func successors ) : ImmutableArray |
Produce a topological sort of a given directed acyclic graph, given a set of nodes which include all nodes that have no predecessors. Any nodes not in the given set, but reachable through successors, will be added to the result. This is an iterative rather than recursive implementation, so it is unlikely to cause a stack overflow.
|
Method | Description | |
---|---|---|
PredecessorCounts ( IEnumerable nodes, Func successors, ImmutableArray &allNodes ) : int>.PooledDictionary |
public static IterativeSort ( IEnumerable nodes, Func successors ) : ImmutableArray |
||
nodes | IEnumerable | Any subset of the nodes that includes all nodes with no predecessors |
successors | Func | A function mapping a node to its set of successors |
return | ImmutableArray |