Class ShellSort

java.lang.Object
org.ddogleg.sorting.ShellSort

public class ShellSort extends Object
Implementation of the shell sort algorithm from Numerical Recipes Third Edition. Is a O(N^{3/2}) sorting algorithm No additional memory allocation is performed Only recommended for less than 50 elements
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    sort(double[] data)
    Sorts data into ascending order
    static void
    sort(double[] data, int offset, int length, int[] indexes)
     
    static void
    sort(float[] data)
     
    static void
    sort(float[] data, int offset, int length, int[] indexes)
     
    static void
    sort(int[] data)
     
    static void
    sort(int[] data, int offset, int length, int[] indexes)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ShellSort

      public ShellSort()
  • Method Details

    • sort

      public static void sort(float[] data)
    • sort

      public static void sort(double[] data)
      Sorts data into ascending order
    • sort

      public static void sort(int[] data)
    • sort

      public static void sort(float[] data, int offset, int length, int[] indexes)
    • sort

      public static void sort(double[] data, int offset, int length, int[] indexes)
    • sort

      public static void sort(int[] data, int offset, int length, int[] indexes)