Skip to main content

quick_sort

Function quick_sort 

Source
pub fn quick_sort<T, F>(arr: &mut [T], less: &F)
where T: Copy, F: Fn(&T, &T) -> bool,
Expand description

Sort a mutable slice using AGG’s quicksort algorithm. Uses insertion sort for small partitions.

This is a direct port of C++ quick_sort from agg_array.h. For most Rust code you’d use slice::sort_by, but this is provided for exact behavioral matching where sort order matters.