pub fn topological_sort<N, E, Ix>(graph: &DiGraph<N, E, Ix>) -> Result<Vec<N>>
Expand description
Topological sort for directed acyclic graphs
Returns nodes in topological order if the graph is a DAG, otherwise returns an error indicating a cycle was found.