org.plasma.common.sort
Class Sort
java.lang.Object
org.plasma.common.sort.Sort
public class Sort
- extends Object
These algorithms can be used to sort an array of
any primitive datatype / Comparable Object.
The datatype conversions for the arrays won't influence
the time complexity of the sorting algorithms.
Without these conversions,
the algorithms would have to be re-written for every primitive datatype.
|
Constructor Summary |
Sort()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Sort
public Sort()
bubbleSort
public static <T extends Comparable<? super T>> void bubbleSort(T[] a)
bubbleSort
public static int[] bubbleSort(int[] a)
bubbleSort
public static long[] bubbleSort(long[] a)
bubbleSort
public static double[] bubbleSort(double[] a)
bubbleSort
public static float[] bubbleSort(float[] a)
bubbleSort
public static char[] bubbleSort(char[] a)
bubbleSort
public static boolean[] bubbleSort(boolean[] a)
bubbleSort
public static byte[] bubbleSort(byte[] a)
selectionSort
public static <T extends Comparable<? super T>> void selectionSort(T[] a)
selectionSort
public static int[] selectionSort(int[] a)
selectionSort
public static long[] selectionSort(long[] a)
selectionSort
public static double[] selectionSort(double[] a)
selectionSort
public static float[] selectionSort(float[] a)
selectionSort
public static char[] selectionSort(char[] a)
selectionSort
public static boolean[] selectionSort(boolean[] a)
selectionSort
public static byte[] selectionSort(byte[] a)
insertionSort
public static <T extends Comparable<? super T>> void insertionSort(T[] a)
insertionSort
public static int[] insertionSort(int[] a)
insertionSort
public static long[] insertionSort(long[] a)
insertionSort
public static double[] insertionSort(double[] a)
insertionSort
public static float[] insertionSort(float[] a)
insertionSort
public static char[] insertionSort(char[] a)
insertionSort
public static boolean[] insertionSort(boolean[] a)
insertionSort
public static byte[] insertionSort(byte[] a)
shellSort
public static <T extends Comparable<? super T>> void shellSort(T[] a)
shellSort
public static int[] shellSort(int[] a)
shellSort
public static long[] shellSort(long[] a)
shellSort
public static double[] shellSort(double[] a)
shellSort
public static float[] shellSort(float[] a)
shellSort
public static char[] shellSort(char[] a)
shellSort
public static boolean[] shellSort(boolean[] a)
shellSort
public static byte[] shellSort(byte[] a)
mergeSort
public static <T extends Comparable<? super T>> void mergeSort(T[] a)
mergeSort
public static int[] mergeSort(int[] a)
mergeSort
public static long[] mergeSort(long[] a)
mergeSort
public static double[] mergeSort(double[] a)
mergeSort
public static float[] mergeSort(float[] a)
mergeSort
public static char[] mergeSort(char[] a)
mergeSort
public static boolean[] mergeSort(boolean[] a)
mergeSort
public static byte[] mergeSort(byte[] a)
quickSort
public static <T extends Comparable<? super T>> void quickSort(T[] a)
quickSort
public static int[] quickSort(int[] a)
quickSort
public static long[] quickSort(long[] a)
quickSort
public static double[] quickSort(double[] a)
quickSort
public static float[] quickSort(float[] a)
quickSort
public static char[] quickSort(char[] a)
quickSort
public static boolean[] quickSort(boolean[] a)
quickSort
public static byte[] quickSort(byte[] a)
Copyright © 2013. All rights reserved.