pub fn sortSpan(self: Self, a: usize, b: usize, ctx: anytype) void self: Selfa: usizeb: usizectx633
634
635 pub fn sortSpan(self: Self, a: usize, b: usize, ctx: anytype) void {
self.sortInternal(a, b, ctx, .stable);
}
Sorts only the subsection of items between indices
aandb(excludingb) This function guarantees a stable sort, i.e the relative order of equal elements is preserved during sorting. Read more about stable sorting here: https://en.wikipedia.org/wiki/Sorting_algorithm#Stability If this guarantee does not matter,sortSpanUnstablemight be a faster alternative.ctxhas the following method:fn lessThan(ctx: @TypeOf(ctx), a_index: usize, b_index: usize) bool