Java Utililty Methods Quick Sort

List of utility methods to do Quick Sort

Description

The list of methods to do Quick Sort are organized into topic(s).

Method

voidquickSort( 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);
voidquickSort( 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:
...
voidquickSort( 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);
voidquicksort(Comparable[] a)
Quicksort algorithm.
quicksort(a, 0, a.length - 1);
voidquicksort(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) {
...
voidquickSort(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) {
...
voidquickSort(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];
...
voidquicksort(double[] main, int[] index)
quicksort
quicksort(main, index, 0, index.length - 1);
voidquicksort(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);
voidquicksort(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])
...