Function dag::topological_sort
source · pub fn topological_sort<InIndex, OutIndex, F, OrderIndicator, FOrd, Set>(
index_set: Set,
predecessor_edges: F,
order_indicator: FOrd
) -> Vec<OutIndex>
Expand description
Topologically sort index_set
and return a sorted Vec
.
For the nodes without order-before relationship, the ones with smaller
order_indicator
output will be ordered first.