public class DoubleArrays
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
BASE_THRESHOLD
Default Limit for Insertion/Selection Sort
|
static double[] |
EMPTY_ARRAY
Empty Array Reference used for Uninitialized Collections
|
static int |
PARALLEL_THRESHOLD
Default Threshold for Multithreaded Sorting Algorythm options
|
| Constructor and Description |
|---|
DoubleArrays() |
| Modifier and Type | Method and Description |
|---|---|
static double[] |
heapify(double[] data,
int size,
DoubleComparator comp)
Helper function to create a Heap out of an array.
|
static void |
insertionSort(double[] array)
Sorts an array according to the natural ascending order using InsertionSort,
|
static void |
insertionSort(double[] array,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Insertion Sort,
|
static void |
insertionSort(double[] array,
int length)
Sorts an array according to the natural ascending order using InsertionSort,
|
static void |
insertionSort(double[] array,
int length,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Insertion Sort,
|
static void |
insertionSort(double[] array,
int from,
int to)
Sorts an array according to the natural ascending order using InsertionSort,
|
static void |
insertionSort(double[] array,
int from,
int to,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Insertion Sort,
|
static void |
memFreeMergeSort(double[] array)
Sorts an array according to the natural ascending order using Memory Free Merge Sort,
This implementation is inspired by FastUtil original merge sort, but without the need to allocate a copy of the original Array.
|
static void |
memFreeMergeSort(double[] array,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Memory Free Merge Sort,
This implementation is inspired by FastUtil original merge sort, but without the need to allocate a copy of the original Array.
|
static void |
memFreeMergeSort(double[] array,
int length)
Sorts an array according to the natural ascending order using Memory Free Merge Sort,
This implementation is inspired by FastUtil original merge sort, but without the need to allocate a copy of the original Array.
|
static void |
memFreeMergeSort(double[] array,
int length,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Memory Free Merge Sort,
This implementation is inspired by FastUtil original merge sort, but without the need to allocate a copy of the original Array.
|
static void |
memFreeMergeSort(double[] array,
int from,
int to)
Sorts an array according to the natural ascending order using Memory Free Merge Sort,
This implementation is inspired by FastUtil original merge sort, but without the need to allocate a copy of the original Array.
|
static void |
memFreeMergeSort(double[] array,
int from,
int to,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Memory Free Merge Sort,
This implementation is inspired by FastUtil original merge sort, but without the need to allocate a copy of the original Array.
|
static void |
mergeSort(double[] array)
Sorts an array according to the natural ascending order using Merge Sort,
This implementation was copied from FastUtil with a couple custom optimizations
|
static void |
mergeSort(double[] array,
double[] supp,
int from,
int to)
Sorts an array according to the natural ascending order using Merge Sort,
This implementation was copied from FastUtil with a couple custom optimizations
|
static void |
mergeSort(double[] array,
double[] supp,
int from,
int to,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Merge Sort,
This implementation was copied from FastUtil with a couple custom optimizations
|
static void |
mergeSort(double[] array,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Merge Sort,
This implementation was copied from FastUtil with a couple custom optimizations
|
static void |
mergeSort(double[] array,
int length)
Sorts an array according to the natural ascending order using Merge Sort,
This implementation was copied from FastUtil with a couple custom optimizations
|
static void |
mergeSort(double[] array,
int length,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Merge Sort,
This implementation was copied from FastUtil with a couple custom optimizations
|
static void |
parallelMemFreeMergeSort(double[] array)
Sorts an array according to the natural ascending order using Parallel Memory Free Merge Sort,
This implementation is inspired by FastUtil original merge sort, but without the need to allocate a copy of the original Array.
|
static void |
parallelMemFreeMergeSort(double[] array,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Parallel Memory Free Merge Sort,
This implementation is inspired by FastUtil original merge sort, but without the need to allocate a copy of the original Array.
|
static void |
parallelMemFreeMergeSort(double[] array,
int length)
Sorts an array according to the natural ascending order using Parallel Memory Free Merge Sort,
This implementation is inspired by FastUtil original merge sort, but without the need to allocate a copy of the original Array.
|
static void |
parallelMemFreeMergeSort(double[] array,
int length,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Parallel Memory Free Merge Sort,
This implementation is inspired by FastUtil original merge sort, but without the need to allocate a copy of the original Array.
|
static void |
parallelMemFreeMergeSort(double[] array,
int from,
int to)
Sorts an array according to the natural ascending order using Parallel Memory Free Merge Sort,
This implementation is inspired by FastUtil original merge sort, but without the need to allocate a copy of the original Array.
|
static void |
parallelMemFreeMergeSort(double[] array,
int from,
int to,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Parallel Memory Free Merge Sort,
This implementation is inspired by FastUtil original merge sort, but without the need to allocate a copy of the original Array.
|
static void |
parallelMergeSort(double[] array)
Sorts an array according to the natural ascending order using Parallel Merge Sort,
This implementation was copied from FastUtil with a couple custom optimizations
|
static void |
parallelMergeSort(double[] array,
double[] supp,
int from,
int to)
Sorts an array according to the natural ascending order using Parallel Merge Sort,
This implementation was copied from FastUtil with a couple custom optimizations
|
static void |
parallelMergeSort(double[] array,
double[] supp,
int from,
int to,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Parallel Merge Sort,
This implementation was copied from FastUtil with a couple custom optimizations
|
static void |
parallelMergeSort(double[] array,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using a Parallel Merge Sort,
This implementation was copied from FastUtil with a couple custom optimizations
|
static void |
parallelMergeSort(double[] array,
int length)
Sorts an array according to the natural ascending order using Parallel Merge Sort,
This implementation was copied from FastUtil with a couple custom optimizations
|
static void |
parallelMergeSort(double[] array,
int length,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Parallel Merge Sort,
This implementation was copied from FastUtil with a couple custom optimizations
|
static void |
parallelQuickSort(double[] array)
Sorts an array according to the natural ascending order using Parallel Quick Sort,
This implementation is a custom of FastUtil quicksort but with a different code structure,
and that sorting Algorithm is based on the tuned quicksort adapted from Jon L.
|
static void |
parallelQuickSort(double[] array,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Parallel Quick Sort,
This implementation is a custom of FastUtil quicksort but with a different code structure,
and that sorting Algorithm is based on the tuned quicksort adapted from Jon L.
|
static void |
parallelQuickSort(double[] array,
int length)
Sorts an array according to the natural ascending order using Parallel Quick Sort,
This implementation is a custom of FastUtil quicksort but with a different code structure,
and that sorting Algorithm is based on the tuned quicksort adapted from Jon L.
|
static void |
parallelQuickSort(double[] array,
int length,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Parallel Quick Sort,
This implementation is a custom of FastUtil quicksort but with a different code structure,
and that sorting Algorithm is based on the tuned quicksort adapted from Jon L.
|
static void |
parallelQuickSort(double[] array,
int from,
int to)
Sorts an array according to the natural ascending order using Parallel Quick Sort,
This implementation is a custom of FastUtil quicksort but with a different code structure,
and that sorting Algorithm is based on the tuned quicksort adapted from Jon L.
|
static void |
parallelQuickSort(double[] array,
int from,
int to,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Parallel Quick Sort,
This implementation is a custom of FastUtil quicksort but with a different code structure,
and that sorting Algorithm is based on the tuned quicksort adapted from Jon L.
|
static void |
quickSort(double[] array)
Sorts an array according to the natural ascending order using Quick Sort,
This implementation is a custom of FastUtil quicksort but with a different code structure,
and that sorting Algorithm is based on the tuned quicksort adapted from Jon L.
|
static void |
quickSort(double[] array,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Quick Sort,
This implementation is a custom of FastUtil quicksort but with a different code structure,
and that sorting Algorithm is based on the tuned quicksort adapted from Jon L.
|
static void |
quickSort(double[] array,
int length)
Sorts an array according to the natural ascending order using Quick Sort,
This implementation is a custom of FastUtil quicksort but with a different code structure,
and that sorting Algorithm is based on the tuned quicksort adapted from Jon L.
|
static void |
quickSort(double[] array,
int length,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Quick Sort,
This implementation is a custom of FastUtil quicksort but with a different code structure,
and that sorting Algorithm is based on the tuned quicksort adapted from Jon L.
|
static void |
quickSort(double[] array,
int from,
int to)
Sorts an array according to the natural ascending order using Quick Sort,
This implementation is a custom of FastUtil quicksort but with a different code structure,
and that sorting Algorithm is based on the tuned quicksort adapted from Jon L.
|
static void |
quickSort(double[] array,
int from,
int to,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Quick Sort,
This implementation is a custom of FastUtil quicksort but with a different code structure,
and that sorting Algorithm is based on the tuned quicksort adapted from Jon L.
|
static void |
selectionSort(double[] array)
Sorts an array according to the natural ascending order using Selection Sort,
|
static void |
selectionSort(double[] array,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Selection Sort,
|
static void |
selectionSort(double[] array,
int length)
Sorts an array according to the natural ascending order using Selection Sort,
|
static void |
selectionSort(double[] array,
int length,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Selection Sort,
|
static void |
selectionSort(double[] array,
int from,
int to)
Sorts an array according to the natural ascending order using Selection Sort,
|
static void |
selectionSort(double[] array,
int from,
int to,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Selection Sort,
|
static int |
shiftDown(double[] data,
int size,
int index,
DoubleComparator comp)
Method to validate if the current value is the lowest value in the heap
|
static int |
shiftUp(double[] data,
int index,
DoubleComparator comp)
Method to sort a specific value into the heap.
|
static double[] |
shuffle(double[] array)
Simple Shuffle method for Arrays.
|
static double[] |
shuffle(double[] array,
java.util.Random random)
Simple Shuffle method for Arrays.
|
static void |
stableSort(double[] array)
Sorts an array according to the natural ascending order,
potentially dynamically choosing an appropriate algorithm given the type and size of the array.
|
static void |
stableSort(double[] array,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator,
potentially dynamically choosing an appropriate algorithm given the type and size of the array.
|
static void |
stableSort(double[] array,
int length)
Sorts an array according to the natural ascending order,
potentially dynamically choosing an appropriate algorithm given the type and size of the array.
|
static void |
stableSort(double[] array,
int length,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator,
potentially dynamically choosing an appropriate algorithm given the type and size of the array.
|
static void |
stableSort(double[] array,
int from,
int to)
Sorts an array according to the natural ascending order,
potentially dynamically choosing an appropriate algorithm given the type and size of the array.
|
static void |
stableSort(double[] array,
int from,
int to,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator,
potentially dynamically choosing an appropriate algorithm given the type and size of the array.
|
static void |
unstableSort(double[] array)
Sorts an array according to the natural ascending order,
potentially dynamically choosing an appropriate algorithm given the type and size of the array.
|
static void |
unstableSort(double[] array,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator,
potentially dynamically choosing an appropriate algorithm given the type and size of the array.
|
static void |
unstableSort(double[] array,
int length)
Sorts an array according to the natural ascending order,
potentially dynamically choosing an appropriate algorithm given the type and size of the array.
|
static void |
unstableSort(double[] array,
int length,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator,
potentially dynamically choosing an appropriate algorithm given the type and size of the array.
|
static void |
unstableSort(double[] array,
int from,
int to)
Sorts an array according to the natural ascending order,
potentially dynamically choosing an appropriate algorithm given the type and size of the array.
|
static void |
unstableSort(double[] array,
int from,
int to,
DoubleComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator,
potentially dynamically choosing an appropriate algorithm given the type and size of the array.
|
static double[] |
unwrap(java.lang.Double[] a)
A Helper function to convert a Double Array to a double Array.
|
static double[] |
unwrap(java.lang.Double[] a,
int length)
A Helper function to convert a Double Array to a double Array.
|
static double[] |
unwrap(java.lang.Double[] a,
int offset,
int length)
A Helper function to convert a Double Array to a double Array.
|
static java.lang.Double[] |
wrap(double[] a)
A Helper function to convert a Primitive Array to a Double Array.
|
static java.lang.Double[] |
wrap(double[] a,
int length)
A Helper function to convert a Primitive Array to a Double Array.
|
static java.lang.Double[] |
wrap(double[] a,
int offset,
int length)
A Helper function to convert a Primitive Array to a Double Array.
|
public static final int BASE_THRESHOLD
public static final int PARALLEL_THRESHOLD
public static final double[] EMPTY_ARRAY
public static java.lang.Double[] wrap(double[] a)
a - the array that should be convertedpublic static java.lang.Double[] wrap(double[] a,
int length)
a - the array that should be convertedlength - the maximum length that should be covertedpublic static java.lang.Double[] wrap(double[] a,
int offset,
int length)
a - the array that should be convertedoffset - the starting offset of the inputarraylength - the maximum length that should be covertedpublic static double[] unwrap(java.lang.Double[] a)
a - the array that should be convertedpublic static double[] unwrap(java.lang.Double[] a,
int length)
a - the array that should be convertedlength - the maximum length that should be covertedpublic static double[] unwrap(java.lang.Double[] a,
int offset,
int length)
a - the array that should be convertedoffset - the starting offset of the inputarraylength - the maximum length that should be covertedpublic static int shiftDown(double[] data,
int size,
int index,
DoubleComparator comp)
data - the current heap.size - the size of the heapindex - the index that should be validatedcomp - the comparator to sort the heap. Can be nullpublic static int shiftUp(double[] data,
int index,
DoubleComparator comp)
data - the heap itself.index - that should be heapified.comp - the comparator to sort the heap. Can be nullpublic static double[] heapify(double[] data,
int size,
DoubleComparator comp)
data - the array to heapifysize - the current size of elements within the array.comp - the Comparator to sort the array. Can be nullpublic static double[] shuffle(double[] array)
array - the elements that should be shuffledpublic static double[] shuffle(double[] array,
java.util.Random random)
array - the elements that should be shuffledrandom - the Random Number Generator that should be used for the shufflingpublic static void stableSort(double[] array,
DoubleComparator comp)
array - the array that needs to be sortedcomp - the Comparator that decides the sorting orderpublic static void stableSort(double[] array,
int length,
DoubleComparator comp)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedcomp - the Comparator that decides the sorting orderpublic static void stableSort(double[] array,
int from,
int to,
DoubleComparator comp)
array - the array that needs to be sortedfrom - where the array should be sorted fromto - where the array should be sorted tocomp - the Comparator that decides the sorting orderpublic static void stableSort(double[] array)
array - the array that needs to be sortedpublic static void stableSort(double[] array,
int length)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedpublic static void stableSort(double[] array,
int from,
int to)
array - the array that needs to be sortedfrom - where the array should be sorted fromto - where the array should be sorted topublic static void unstableSort(double[] array,
DoubleComparator comp)
array - the array that needs to be sortedcomp - the Comparator that decides the sorting orderpublic static void unstableSort(double[] array,
int length,
DoubleComparator comp)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedcomp - the Comparator that decides the sorting orderpublic static void unstableSort(double[] array,
int from,
int to,
DoubleComparator comp)
array - the array that needs to be sortedfrom - where the array should be sorted fromto - where the array should be sorted tocomp - the Comparator that decides the sorting orderpublic static void unstableSort(double[] array)
array - the array that needs to be sortedpublic static void unstableSort(double[] array,
int length)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedpublic static void unstableSort(double[] array,
int from,
int to)
array - the array that needs to be sortedfrom - where the array should be sorted fromto - where the array should be sorted topublic static void insertionSort(double[] array,
DoubleComparator comp)
array - the array that needs to be sortedcomp - the Comparator that decides the sorting orderpublic static void insertionSort(double[] array,
int length,
DoubleComparator comp)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedcomp - the Comparator that decides the sorting orderpublic static void insertionSort(double[] array,
int from,
int to,
DoubleComparator comp)
array - the array that needs to be sortedfrom - where the array should be sorted fromto - where the array should be sorted tocomp - the Comparator that decides the sorting orderpublic static void insertionSort(double[] array)
array - the array that needs to be sortedpublic static void insertionSort(double[] array,
int length)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedpublic static void insertionSort(double[] array,
int from,
int to)
array - the array that needs to be sortedfrom - where the array should be sorted fromto - where the array should be sorted topublic static void selectionSort(double[] array,
DoubleComparator comp)
array - the array that needs to be sortedcomp - the Comparator that decides the sorting orderpublic static void selectionSort(double[] array,
int length,
DoubleComparator comp)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedcomp - the Comparator that decides the sorting orderpublic static void selectionSort(double[] array,
int from,
int to,
DoubleComparator comp)
array - the array that needs to be sortedfrom - where the array should be sorted fromto - where the array should be sorted tocomp - the Comparator that decides the sorting orderpublic static void selectionSort(double[] array)
array - the array that needs to be sortedpublic static void selectionSort(double[] array,
int length)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedpublic static void selectionSort(double[] array,
int from,
int to)
array - the array that needs to be sortedfrom - where the array should be sorted fromto - where the array should be sorted topublic static void mergeSort(double[] array,
DoubleComparator comp)
array - the array that needs to be sortedcomp - the Comparator that decides the sorting orderpublic static void mergeSort(double[] array,
int length,
DoubleComparator comp)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedcomp - the Comparator that decides the sorting orderpublic static void mergeSort(double[] array,
double[] supp,
int from,
int to,
DoubleComparator comp)
array - the array that needs to be sortedsupp - the auxillary array that is used to simplify the sortingfrom - where the array should be sorted fromto - where the array should be sorted tocomp - the Comparator that decides the sorting orderpublic static void mergeSort(double[] array)
array - the array that needs to be sortedpublic static void mergeSort(double[] array,
int length)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedpublic static void mergeSort(double[] array,
double[] supp,
int from,
int to)
array - the array that needs to be sortedsupp - the auxillary array that is used to simplify the sortingfrom - where the array should be sorted fromto - where the array should be sorted topublic static void parallelMergeSort(double[] array,
DoubleComparator comp)
array - the array that needs to be sortedcomp - the Comparator that decides the sorting orderSanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>) which the threadpool can be changed as neededpublic static void parallelMergeSort(double[] array,
int length,
DoubleComparator comp)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedcomp - the Comparator that decides the sorting orderSanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>) which the threadpool can be changed as neededpublic static void parallelMergeSort(double[] array,
double[] supp,
int from,
int to,
DoubleComparator comp)
array - the array that needs to be sortedsupp - the auxillary array that is used to simplify the sortingfrom - where the array should be sorted fromto - where the array should be sorted tocomp - the Comparator that decides the sorting orderSanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>) which the threadpool can be changed as neededpublic static void parallelMergeSort(double[] array)
array - the array that needs to be sortedSanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>) which the threadpool can be changed as neededpublic static void parallelMergeSort(double[] array,
int length)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedSanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>) which the threadpool can be changed as neededpublic static void parallelMergeSort(double[] array,
double[] supp,
int from,
int to)
array - the array that needs to be sortedsupp - the auxillary array that is used to simplify the sortingfrom - where the array should be sorted fromto - where the array should be sorted toSanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>) which the threadpool can be changed as neededpublic static void memFreeMergeSort(double[] array,
DoubleComparator comp)
array - the array that needs to be sortedcomp - the Comparator that decides the sorting orderpublic static void memFreeMergeSort(double[] array,
int length,
DoubleComparator comp)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedcomp - the Comparator that decides the sorting orderpublic static void memFreeMergeSort(double[] array,
int from,
int to,
DoubleComparator comp)
array - the array that needs to be sortedfrom - where the array should be sorted fromto - where the array should be sorted tocomp - the Comparator that decides the sorting orderpublic static void memFreeMergeSort(double[] array)
array - the array that needs to be sortedpublic static void memFreeMergeSort(double[] array,
int length)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedpublic static void memFreeMergeSort(double[] array,
int from,
int to)
array - the array that needs to be sortedfrom - where the array should be sorted fromto - where the array should be sorted topublic static void parallelMemFreeMergeSort(double[] array,
DoubleComparator comp)
array - the array that needs to be sortedcomp - the Comparator that decides the sorting orderSanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>) which the threadpool can be changed as neededpublic static void parallelMemFreeMergeSort(double[] array,
int length,
DoubleComparator comp)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedcomp - the Comparator that decides the sorting orderSanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>) which the threadpool can be changed as neededpublic static void parallelMemFreeMergeSort(double[] array,
int from,
int to,
DoubleComparator comp)
array - the array that needs to be sortedfrom - where the array should be sorted fromto - where the array should be sorted tocomp - the Comparator that decides the sorting orderSanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>) which the threadpool can be changed as neededpublic static void parallelMemFreeMergeSort(double[] array)
array - the array that needs to be sortedSanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>) which the threadpool can be changed as neededpublic static void parallelMemFreeMergeSort(double[] array,
int length)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedSanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>) which the threadpool can be changed as neededpublic static void parallelMemFreeMergeSort(double[] array,
int from,
int to)
array - the array that needs to be sortedfrom - where the array should be sorted fromto - where the array should be sorted toSanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>) which the threadpool can be changed as neededpublic static void quickSort(double[] array,
DoubleComparator comp)
array - the array that needs to be sortedcomp - the Comparator that decides the sorting orderpublic static void quickSort(double[] array,
int length,
DoubleComparator comp)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedcomp - the Comparator that decides the sorting orderpublic static void quickSort(double[] array,
int from,
int to,
DoubleComparator comp)
array - the array that needs to be sortedfrom - where the array should be sorted fromto - where the array should be sorted tocomp - the Comparator that decides the sorting orderpublic static void quickSort(double[] array)
array - the array that needs to be sortedpublic static void quickSort(double[] array,
int length)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedpublic static void quickSort(double[] array,
int from,
int to)
array - the array that needs to be sortedfrom - where the array should be sorted fromto - where the array should be sorted topublic static void parallelQuickSort(double[] array,
DoubleComparator comp)
array - the array that needs to be sortedcomp - the Comparator that decides the sorting orderSanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>) which the threadpool can be changed as neededpublic static void parallelQuickSort(double[] array,
int length,
DoubleComparator comp)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedcomp - the Comparator that decides the sorting orderSanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>) which the threadpool can be changed as neededpublic static void parallelQuickSort(double[] array,
int from,
int to,
DoubleComparator comp)
array - the array that needs to be sortedfrom - where the array should be sorted fromto - where the array should be sorted tocomp - the Comparator that decides the sorting orderSanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>) which the threadpool can be changed as neededpublic static void parallelQuickSort(double[] array)
array - the array that needs to be sortedSanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>) which the threadpool can be changed as neededpublic static void parallelQuickSort(double[] array,
int length)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedSanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>) which the threadpool can be changed as neededpublic static void parallelQuickSort(double[] array,
int from,
int to)
array - the array that needs to be sortedfrom - where the array should be sorted fromto - where the array should be sorted toSanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>) which the threadpool can be changed as needed