List of utility methods to do Quick Sort
void | quickSort( double[] array, int[] index, int left, int right) Implements quicksort according to Manber's "Introduction to Algorithms". if (left < right) { int middle = partition(array, index, left, right); quickSort(array, index, left, middle); quickSort(array, index, middle + 1, right); |
void | quickSort( double[] array, int[] index, int left, int right) Implements quicksort with median-of-three method and explicit sort for problems of size three or less. int diff = right - left; switch (diff) { case 0: return; case 1: conditionalSwap(array, index, left, right); return; case 2: ... |
void | quickSort( float[] array, int[] index, int left, int right) Implements quicksort according to Manber's "Introduction to Algorithms". if (left < right) { int middle = partition(array, index, left, right); quickSort(array, index, left, middle); quickSort(array, index, middle + 1, right); |
void | quicksort(Comparable[] a) Quicksort algorithm. quicksort(a, 0, a.length - 1); |
void | quicksort(double lista1[], int lista2[], int izq, int der) quicksort int i = izq; int j = der; double pivote = lista1[(i + j) / 2]; do { while (lista1[i] < pivote) { i++; while (lista1[j] > pivote) { ... |
void | quickSort(double[] array, int low, int high) Quicksort filter. int i = low, j = high; double pivot = array[low + (high - low) / 2]; double exchange; while (i <= j) { while (array[i] < pivot) { i++; while (array[j] > pivot) { ... |
void | quickSort(double[] array, int[] idx, int from, int to) Quick sort procedure (ascending order) if (from < to) { double temp = array[to]; int tempIdx = idx[to]; int i = from - 1; for (int j = from; j < to; j++) { if (array[j] <= temp) { i++; double tempValue = array[j]; ... |
void | quicksort(double[] main, int[] index) quicksort quicksort(main, index, 0, index.length - 1); |
void | quicksort(final double[] array, final int[] index) Sort an array and store the indices of the sorted elements. assert array != null; assert index != null; assert array.length == index.length; for (int i = 0; i < index.length; i++) { index[i] = i; quicksort(array, index, 0, index.length - 1); |
void | quicksort(final long[] data, final int left, final int right) quicksort if (data == null || data.length < 2) return; int i = left, j = right; long x = data[(left + right) / 2]; do { while (data[i] < x) i++; while (x < data[j]) ... |