final def sort[A](data: Array[A], start: Int, end: Int, perm: Array[Int])(implicit o: Order[A]): Unit
Uses insertion sort on data to sort the entries from the index start up to, but not including, the index end. Permutation indices are returned in perm: data[perm[k]] is the k-th smallest elem in data data is not modified. Does not allocate, except on stack.
Uses insertion sort on data to sort the entries from the index start up to, but not including, the index end. Permutation indices are returned in perm: data[perm[k]] is the k-th smallest elem in data data is not modified. Does not allocate, except on stack.
Type parameters
A
a member of the type class Order
Value parameters
data
the array to be sorted
end
the index of the last element, exclusive, to be sorted
perm
array of permutation indices
start
the index of the first element, inclusive, to be sorted