Same as rank(), but also sorts the input range. The array returned will still be identical to that returned by rank(), i.e. the rank of each element will correspond to the ranks of the elements in the input array before sorting.
uint[] test = [3, 5, 3, 1, 2]; assert(rankSort(test) == [3.5, 5, 3.5, 1.0, 2.0]); assert(test == [1U, 2, 3, 4, 5]);
See Implementation
Same as rank(), but also sorts the input range. The array returned will still be identical to that returned by rank(), i.e. the rank of each element will correspond to the ranks of the elements in the input array before sorting.