Function petgraph::algo::toposort [] [src]

pub fn toposort<G>(g: G) -> Vec<G::NodeId> where G: IntoNodeIdentifiers + IntoNeighborsDirected + IntoExternals + Visitable

[Generic] Perform a topological sort of a directed graph.

Return a vector of nodes in topological order: each node is ordered before its successors.

If the returned vec contains less than all the nodes of the graph, then the graph was cyclic.