Method RadixSort
RadixSort(uint[], int, ref uint[], int)
Radix sort or bucket sort, stable and non in place.
Declaration
public static void RadixSort(uint[] arr, int sortSize, ref uint[] supportArray, int radixBits = 8)
Parameters
Type | Name | Description |
---|---|---|
uint[] | arr | Array to sort. |
int | sortSize | Size of the array to sort. If greater than array capacity, it will get clamped. |
uint[] | supportArray | Array of uints that is used for support data. The algorithm will automatically allocate it if necessary. |
int | radixBits | Number of bits to use for each bucket. Can only be 8, 4 or 2. |
RadixSort(NativeArray<uint>, int, ref NativeArray<uint>, int)
Radix sort or bucket sort, stable and non in place.
Declaration
public static void RadixSort(NativeArray<uint> array, int sortSize, ref NativeArray<uint> supportArray, int radixBits = 8)
Parameters
Type | Name | Description |
---|---|---|
NativeArray<uint> | array | Array to sort. |
int | sortSize | Size of the array to sort. If greater than array capacity, it will get clamped. |
NativeArray<uint> | supportArray | Array of uints that is used for support data. The algorithm will automatically allocate it if necessary. |
int | radixBits | Number of bits to use for each bucket. Can only be 8, 4 or 2. |