/** * Copyright (c) 2017-2026 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal * @author Alexander Rose */ export type Comparer = (data: T, i: number, j: number) => number; export type Swapper = (data: T, i: number, j: number) => void; export declare function arrayLess(arr: ArrayLike, i: number, j: number): number; export declare function arraySwap(arr: ArrayLike, i: number, j: number): void; export declare function sortArray(data: ArrayLike, cmp?: Comparer>): ArrayLike; export declare function sortArrayRange(data: ArrayLike, start: number, end: number, cmp?: Comparer>): ArrayLike; export declare function sort(data: T, start: number, end: number, cmp: Comparer, swap: Swapper): T; /** * In-place LSD radix sort (8-bit digits) for non-negative integers, ascending. * `maxValue` is an inclusive upper bound of the values and determines the number * of passes; it is computed from the data when omitted. * * Typically outperforms comparison sorts, at the cost of a scratch * array allocation of the same size as the input. */ export declare function radixSort(data: T, maxValue?: number): T;