fn backward_sorted<T>(&self, items: &mut [(usize, T)]) {
        debug_assert!(items.iter().all(|&(i, _)| i < self.len()));
        debug_assert!(items.is_sorted_by_key(|&(i, _)| i));
        debug_assert!(items.windows(2).all(|w| w[0].0 < w[1].0));

        self.backward_unsorted(items);
        items.sort_unstable_by_key(|&(i, _)| i);
    }
/// Apply the backward permutation to a collection of items, keeping them sorted.
///
/// # Arguments
///
/// * `items`: Sorted slice of `(index, value)` tuples where the indices are unique.
Apply the backward permutation to a collection of items, keeping them sorted.
Apply the backward permutation to a collection of items keeping them sorted .
fn backward_sorted<T>(&self, items: &mut [(usize, T)]) {
        debug_assert!(items.iter().all(|&(i, _)| i < self.len()));
        debug_assert!(items.is_sorted_by_key(|&(i, _)| i));
        debug_assert!(items.windows(2).all(|w| w[0].0 < w[1].0));
        self.backward_unsorted(items);
        items.sort_unstable_by_key(|&(i, _)| i);
    }
fn backward_sorted < T > ( & self , items : & mut [ ( usize , T ) ] ) { debug_assert ! ( items iter ( ) all ( ( i ) i self len ( ) ) ) ; debug_assert ! ( items is_sorted_by_key ( ( i ) i ) ) ; debug_assert ! ( items windows ( 2 ) all ( w w [ 0 ] 0 w [ 1 ] 0 ) ) ; self . backward_unsorted ( items ) ; items . sort_unstable_by_key ( | & ( i , _ ) | i ) ; }
Apply the backward permutation to a collection of items, keeping them sorted.
Apply the backward permutation to a collection of items keeping them sorted .
&self
items
&mut [(usize, T)]
&self
items
&mut [(usize, T)]