Class InPlaceMergeSorter

java.lang.Object
org.apache.lucene.util.Sorter
org.apache.lucene.util.InPlaceMergeSorter
Direct Known Subclasses:
ArrayInPlaceMergeSorter, WordDelimiterFilter.OffsetSorter, WordDelimiterGraphFilter.PositionSorter

public abstract class InPlaceMergeSorter extends Sorter
Sorter implementation based on the merge-sort algorithm that merges in place (no extra memory will be allocated). Small arrays are sorted with insertion sort.
  • Constructor Details

  • Method Details

    • sort

      public final void sort(int from, int to)
      Description copied from class: Sorter
      Sort the slice which starts at from (inclusive) and ends at to (exclusive).
      Specified by:
      sort in class Sorter
    • mergeSort

      void mergeSort(int from, int to)