Function provide_sorted_batch

Source
fn provide_sorted_batch<T, F>(
    v: &mut [T],
    start: usize,
    end: usize,
    is_less: &F,
) -> usize
where F: Fn(&T, &T) -> bool,
Expand description

Takes a range as denoted by start and end, that is already sorted and extends it to the right if necessary with sorts optimized for smaller ranges such as insertion sort.