java.lang.Object
org.apache.lucene.util.Sorter
org.apache.lucene.util.InPlaceMergeSorter
- Direct Known Subclasses:
ArrayInPlaceMergeSorter
,WordDelimiterFilter.OffsetSorter
,WordDelimiterGraphFilter.PositionSorter
Sorter
implementation based on the merge-sort algorithm that merges in place (no extra
memory will be allocated). Small arrays are sorted with binary sort.
This algorithm is stable. It's especially suited to sorting small lists where we'd rather optimize for avoiding allocating memory for this task. It performs well on lists that are already sorted.
-
Field Summary
Fields inherited from class org.apache.lucene.util.Sorter
BINARY_SORT_THRESHOLD, INSERTION_SORT_THRESHOLD
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.lucene.util.Sorter
binarySort, binarySort, checkRange, compare, comparePivot, doRotate, heapChild, heapify, heapParent, heapSort, insertionSort, lower, lower2, mergeInPlace, reverse, rotate, setPivot, siftDown, swap, upper, upper2
-
Constructor Details
-
InPlaceMergeSorter
public InPlaceMergeSorter()Create a newInPlaceMergeSorter
-
-
Method Details