Function sortUnstableContext [src]
Sorts a range [a, b) using an unstable algorithm with custom context.
This is a lower-level interface for sorting that works with indices instead of slices.
Does not preserve relative order of equal elements.
The context must provide lessThan(a_idx, b_idx) and swap(a_idx, b_idx) methods.
Uses pattern-defeating quicksort (PDQ) algorithm.
Prototype
pub fn sortUnstableContext(a: usize, b: usize, context: anytype) void Parameters
a: usizeb: usize Source
pub fn sortUnstableContext(a: usize, b: usize, context: anytype) void {
std.sort.pdqContext(a, b, context);
}