C# Класс Microsoft.CodeAnalysis.TopologicalSort

A helper class that contains a topological sort algorithm.
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
PredecessorCounts ( IEnumerable nodes, Func successors, ImmutableArray &allNodes ) : int>.PooledDictionary

Описание методов

IterativeSort() публичный статический Метод

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.
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
Результат ImmutableArray