public class DoubleIntegerArrayQuickSort extends Object
Modifier and Type | Field and Description |
---|---|
private static int |
INSERTION_THRESHOLD
Threshold for using insertion sort.
|
Constructor and Description |
---|
DoubleIntegerArrayQuickSort() |
Modifier and Type | Method and Description |
---|---|
private static void |
insertionSort(double[] keys,
int[] vals,
int start,
int end)
Sort via insertion sort.
|
private static void |
insertionSortReverse(double[] keys,
int[] vals,
int start,
int end)
Sort via insertion sort.
|
private static void |
quickSort(double[] keys,
int[] vals,
int start,
int end)
Actual recursive sort function.
|
private static void |
quickSortReverse(double[] keys,
int[] vals,
int start,
int end)
Actual recursive sort function.
|
static void |
sort(double[] keys,
int[] values,
int len)
Sort the full array using the given comparator.
|
static void |
sort(double[] keys,
int[] values,
int start,
int end)
Sort the array using the given comparator.
|
private static void |
sort5(double[] keys,
int[] vals,
int m1,
int m2,
int m3,
int m4,
int m5)
An explicit sort, for the five pivot candidates.
|
static void |
sortReverse(double[] keys,
int[] values,
int len)
Sort the full array using the given comparator.
|
static void |
sortReverse(double[] keys,
int[] values,
int start,
int end)
Sort the array using the given comparator.
|
private static void |
sortReverse5(double[] keys,
int[] vals,
int m1,
int m2,
int m3,
int m4,
int m5)
An explicit sort, for the five pivot candidates.
|
private static void |
swap(double[] keys,
int[] vals,
int j,
int i)
Swap two entries.
|
private static final int INSERTION_THRESHOLD
public static void sort(double[] keys, int[] values, int len)
keys
- Keys for sortingvalues
- Values for sortinglen
- Length to sort.public static void sort(double[] keys, int[] values, int start, int end)
keys
- Keys for sortingvalues
- Values for sortingstart
- First indexend
- Last index (exclusive)private static void quickSort(double[] keys, int[] vals, int start, int end)
keys
- Keys for sortingvals
- Values for sortingstart
- First indexend
- Last index (exclusive!)private static void sort5(double[] keys, int[] vals, int m1, int m2, int m3, int m4, int m5)
m1 < m2 < m3 < m4 < m5
.keys
- Keysvals
- Valuesm1
- Pivot candidate positionm2
- Pivot candidate positionm3
- Pivot candidate positionm4
- Pivot candidate positionm5
- Pivot candidate positionprivate static void insertionSort(double[] keys, int[] vals, int start, int end)
keys
- Keysvals
- Valuesstart
- Interval startend
- Interval endpublic static void sortReverse(double[] keys, int[] values, int len)
keys
- Keys for sortingvalues
- Values for sortinglen
- Length to sort.public static void sortReverse(double[] keys, int[] values, int start, int end)
keys
- Keys for sortingvalues
- Values for sortingstart
- First indexend
- Last index (exclusive)private static void quickSortReverse(double[] keys, int[] vals, int start, int end)
keys
- Keys for sortingvals
- Values for sortingstart
- First indexend
- Last index (exclusive!)private static void sortReverse5(double[] keys, int[] vals, int m1, int m2, int m3, int m4, int m5)
m1 < m2 < m3 < m4 < m5
.keys
- Keysvals
- Valuesm1
- Pivot candidate positionm2
- Pivot candidate positionm3
- Pivot candidate positionm4
- Pivot candidate positionm5
- Pivot candidate positionprivate static void insertionSortReverse(double[] keys, int[] vals, int start, int end)
keys
- Keysvals
- Valuesstart
- Interval startend
- Interval endprivate static void swap(double[] keys, int[] vals, int j, int i)
keys
- Keysvals
- Valuesj
- First indexi
- Second indexCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.