Class ShortQuickSort
java.lang.Object
org.eclipse.collections.impl.utility.primitive.ShortQuickSort
ShortQuickSort is an implementation of the Quick Sort algorithm as described in Donald Knuth's TAOCP with some
optimizations. It supports indirect array sorting based on primitive comparators and/or key values extracted from
the array values if a sort order other thant the natural one of the array elements is required.
This file was automatically generated from template file primitiveSort.stg.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
insertionSort
(short[] array, int left, int right, ShortComparator comparator) static void
sort
(short[] array, int left, int right, ShortComparator comparator) private static void
swap
(short[] array, int i1, int i2)
-
Field Details
-
SORT_SMALL_SIZE
private static final int SORT_SMALL_SIZE- See Also:
-
-
Constructor Details
-
ShortQuickSort
private ShortQuickSort()
-
-
Method Details
-
sort
-
insertionSort
-
swap
private static void swap(short[] array, int i1, int i2)
-