DoxigAlpha

sort

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, sortUnstable might be a faster alternative. ctx has the following method: fn lessThan(ctx: @TypeOf(ctx), a_index: usize, b_index: usize) bool

Function parameters

Parameters

#
ctx:anytype

A MultiArrayList stores a list of a struct or tagged union type.

Functions

#
MultiArrayList
A MultiArrayList stores a list of a struct or tagged union type.

Source

Implementation

#
pub fn sort(self: Self, ctx: anytype) void {
    self.sortInternal(0, self.len, ctx, .stable);
}