C# 클래스 Microsoft.CodeAnalysis.TopologicalSort

A helper class that contains a topological sort algorithm.
파일 보기 프로젝트 열기: stark-lang/stark-roslyn

공개 메소드들

메소드 설명
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