java.lang.Object
org.jgrapht.util.RadixSort
Sorts the specified list of integers into ascending order using the Radix Sort method.
This algorithms runs in $O(N + V)$ time and uses $O(N + V)$ extra memory, where $V = 256$.
If $N \leq RadixSort.CUT\_OFF$ then the standard Java sorting algorithm is used.
The specified list must be modifiable, but need not be resizable.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static int[]
static int
Deprecated, for removal: This API element is subject to removal in a future version.private static final int
private static final int
private static final int
private static final int
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
CUT_OFF
Deprecated, for removal: This API element is subject to removal in a future version.usesetCutOff(int)
instead -
MAX_DIGITS
private static final int MAX_DIGITS- See Also:
-
MAX_D
private static final int MAX_D- See Also:
-
SIZE_RADIX
private static final int SIZE_RADIX- See Also:
-
MASK
private static final int MASK- See Also:
-
count
private static int[] count
-
-
Constructor Details
-
RadixSort
private RadixSort()
-
-
Method Details
-
setCutOff
public static void setCutOff(int cutOff) -
radixSort
private static void radixSort(int[] array, int n, int[] tempArray, int[] cnt) -
sort
Sort the given list in ascending order.- Parameters:
list
- the input list of integers
-
setCutOff(int)
instead