Package org.ddogleg.sorting
Class ShellSort
java.lang.Object
org.ddogleg.sorting.ShellSort
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
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
sort
(double[] data) Sorts data into ascending orderstatic 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)
-
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)
-