Class TimSorter

    • Method Detail

      • sort

        public 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
      • copy

        protected abstract void copy​(int src,
                                     int dest)
        Copy data from slot src to slot dest.
      • save

        protected abstract void save​(int i,
                                     int len)
        Save all elements between slots i and i+len into the temporary storage.
      • restore

        protected abstract void restore​(int i,
                                        int j)
        Restore element j from the temporary storage into slot i.
      • compareSaved

        protected abstract int compareSaved​(int i,
                                            int j)
        Compare element i from the temporary storage with element j from the slice to sort, similarly to Sorter.compare(int, int).