Table of Contents

Method TopologicalOrderList

Namespace
Sccg.Utility
Assembly
Sccg.dll

TopologicalOrderList()

Get an array of all vertex numbers in topological order.
Note: This method throws InvalidOperationException if the graph is not a DAG.

public List<int> TopologicalOrderList()

Returns

List<int>

Topological sorted list.

[0]  [1] ← [2]  [4]  [5]
              ↖    ↙
               [3] ← [6]

Exceptions

InvalidOperationException

Cycle is detected