sort

@JvmName(name = "kartifexHackSort1")
fun <T> Array<T>.sort(start: Int = 0, end: Int = size, selector: (T) -> Double)(source)


@JvmName(name = "kartifexHackSort2")
fun <T> sort(a: Array<T>, start: Int = 0, end: Int = a.size, selector: (T) -> Double)(source)

Sorts a given array within a specified range based on a selector function that maps each element to a Double value.

Parameters

a

The array to be sorted.

start

The starting index (inclusive) of the range to sort. Defaults to 0.

end

The ending index (exclusive) of the range to sort. Defaults to the size of the array.

selector

A lambda function that takes an element of the array and returns a Double value to sort by.