Top Description Fields Constructors Methods
org.eclipse.collections.impl.utility.primitive

public final Class LongQuickSort

extends Object
Class Inheritance
Imports
org.eclipse.collections.api.block.comparator.primitive.LongComparator

LongQuickSort 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

Modifier and TypeField and Description
private static final int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static void
insertionSort(long[] array, int left, int right, LongComparator comparator)

public static void
sort(long[] array, int left, int right, LongComparator comparator)

private static void
swap(long[] array, int i1, int i2)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

SORT_SMALL_SIZEback to summary
private static final int SORT_SMALL_SIZE

Constructor Detail

LongQuickSortback to summary
private LongQuickSort()

Method Detail

insertionSortback to summary
private static void insertionSort(long[] array, int left, int right, LongComparator comparator)
sortback to summary
public static void sort(long[] array, int left, int right, LongComparator comparator)
swapback to summary
private static void swap(long[] array, int i1, int i2)