[][src]Function tree_mem_sort::sort

pub fn sort<T, P, C>(nodes: &mut [T], parent: P, children: C) where
    P: Fn(&mut T) -> &mut Option<usize>,
    C: Fn(&mut T) -> &mut [usize]

Performs in-memory topological sort on a tree where order is determined by every child being greater than their parent, and every sibling being greater than previous siblings.