The documentation for retworkx has migrated to:
These docs will no longer be updated.
- topological_sort(graph, /)¶
Return the topological sort of node indexes from the provided graph
graph (PyDiGraph) – The DAG to get the topological sort on
A list of node indices topologically sorted.
- Return type
DAGHasCycle – if a cycle is encountered while sorting the graph