Package com.aoindustries.util.sort
Class IntegerRadixSortExperimental
- java.lang.Object
-
- com.aoindustries.util.sort.IntegerRadixSortExperimental
-
- All Implemented Interfaces:
IntegerSortAlgorithm,SortAlgorithm<Number>
public final class IntegerRadixSortExperimental extends Object
A radix sort implementation for numeric data, sorting by its integer representation. TODO: Consider thread-local for the small sort space- Author:
- AO Industries, Inc.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static intget(int[] array, int i, SortStatistics stats)protected static intget(IntList list, int i, SortStatistics stats)protected static <T> Tget(List<T> list, int i, SortStatistics stats)protected static <T> Tget(T[] array, int i, SortStatistics stats)static IntegerRadixSortExperimentalgetInstance()booleanisStable()Checks if this is a stable sort.protected static voidset(int[] array, int i, int value, SortStatistics stats)protected static voidset(IntList list, int i, int value, SortStatistics stats)protected static <T> voidset(List<T> list, int i, T O, SortStatistics stats)protected static <T> voidset(T[] array, int i, T O, SortStatistics stats)voidsort(int[] array)static voidsort(int[] array, int offset, int end, int shift, Queue<Future<?>> futures)voidsort(int[] array, SortStatistics stats)voidsort(IntList list)voidsort(IntList list, SortStatistics stats)<N extends Number>
voidsort(List<N> list, SortStatistics stats)<T extends E>
voidsort(List<T> list)<N extends Number>
voidsort(N[] array, SortStatistics stats)<T extends E>
voidsort(T[] array)protected static voidswap(int[] array, int i, int j, SortStatistics stats)protected static voidswap(IntList list, int i, int j, SortStatistics stats)protected static <T> voidswap(List<T> list, int i, int j, SortStatistics stats)protected static <T> voidswap(T[] array, int i, int j, SortStatistics stats)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.aoindustries.util.sort.SortAlgorithm
sort, sort
-
-
-
-
Method Detail
-
getInstance
public static IntegerRadixSortExperimental getInstance()
-
isStable
public boolean isStable()
Description copied from interface:SortAlgorithmChecks if this is a stable sort. A stable sort will keep elements with equal values in their same relative order.
-
sort
public <N extends Number> void sort(List<N> list, SortStatistics stats)
- Specified by:
sortin interfaceSortAlgorithm<Number>
-
sort
public <N extends Number> void sort(N[] array, SortStatistics stats)
- Specified by:
sortin interfaceSortAlgorithm<Number>
-
sort
public void sort(IntList list, SortStatistics stats)
- Specified by:
sortin interfaceIntegerSortAlgorithm
-
sort
public void sort(int[] array, SortStatistics stats)- Specified by:
sortin interfaceIntegerSortAlgorithm
-
sort
public static void sort(int[] array, int offset, int end, int shift, Queue<Future<?>> futures)
-
sort
public void sort(IntList list)
- Specified by:
sortin interfaceIntegerSortAlgorithm
-
sort
public void sort(int[] array)
- Specified by:
sortin interfaceIntegerSortAlgorithm
-
get
protected static int get(IntList list, int i, SortStatistics stats)
-
get
protected static int get(int[] array, int i, SortStatistics stats)
-
set
protected static void set(IntList list, int i, int value, SortStatistics stats)
-
set
protected static void set(int[] array, int i, int value, SortStatistics stats)
-
swap
protected static void swap(IntList list, int i, int j, SortStatistics stats)
-
swap
protected static void swap(int[] array, int i, int j, SortStatistics stats)
-
sort
public <T extends E> void sort(List<T> list)
- Specified by:
sortin interfaceSortAlgorithm<E>
-
sort
public <T extends E> void sort(T[] array)
- Specified by:
sortin interfaceSortAlgorithm<E>
-
get
protected static <T> T get(List<T> list, int i, SortStatistics stats)
-
get
protected static <T> T get(T[] array, int i, SortStatistics stats)
-
set
protected static <T> void set(List<T> list, int i, T O, SortStatistics stats)
-
set
protected static <T> void set(T[] array, int i, T O, SortStatistics stats)
-
swap
protected static <T> void swap(List<T> list, int i, int j, SortStatistics stats)
-
swap
protected static <T> void swap(T[] array, int i, int j, SortStatistics stats)
-
-