topological_sort

Function topological_sort 

Source
pub fn topological_sort<N, E, Ix>(graph: &DiGraph<N, E, Ix>) -> Result<Vec<N>>
where N: Node + Debug, E: EdgeWeight, Ix: IndexType,
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.