public class ShortArrays
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
BASE_THRESHOLD
Default Limit for Insertion/Selection Sort
|
static short[] |
EMPTY_ARRAY
Empty Array Reference used for Uninitialized Collections
|
static int |
PARALLEL_THRESHOLD
Default Threshold for Multithreaded Sorting Algorythm options
|
| Constructor and Description |
|---|
ShortArrays() |
| Modifier and Type | Method and Description |
|---|---|
static short[] |
heapify(short[] data,
int size,
ShortComparator comp)
Helper function to create a Heap out of an array.
|
static short[] |
insertionSort(short[] array)
Sorts an array according to the natural ascending order using InsertionSort,
|
static void |
insertionSort(short[] array,
int length)
Sorts an array according to the natural ascending order using InsertionSort,
|
static void |
insertionSort(short[] array,
int from,
int to)
Sorts an array according to the natural ascending order using InsertionSort,
|
static void |
insertionSort(short[] array,
int from,
int to,
ShortComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Insertion Sort,
|
static void |
insertionSort(short[] array,
int length,
ShortComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Insertion Sort,
|
static short[] |
insertionSort(short[] array,
ShortComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Insertion Sort,
|
static short[] |
memFreeMergeSort(short[] 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(short[] 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(short[] 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(short[] array,
int from,
int to,
ShortComparator 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(short[] array,
int length,
ShortComparator 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(short[] array,
ShortComparator 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 short[] |
mergeSort(short[] 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(short[] 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(short[] array,
int length,
ShortComparator 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(short[] array,
short[] 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(short[] array,
short[] supp,
int from,
int to,
ShortComparator 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 short[] |
mergeSort(short[] array,
ShortComparator 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(short[] 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(short[] 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(short[] 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(short[] array,
int from,
int to,
ShortComparator 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(short[] array,
int length,
ShortComparator 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(short[] array,
ShortComparator 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(short[] 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(short[] 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(short[] array,
int length,
ShortComparator 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(short[] array,
short[] 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(short[] array,
short[] supp,
int from,
int to,
ShortComparator 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(short[] array,
ShortComparator 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 |
parallelQuickSort(short[] 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(short[] 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(short[] 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(short[] array,
int from,
int to,
ShortComparator 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(short[] array,
int length,
ShortComparator 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(short[] array,
ShortComparator 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 short[] |
pour(ShortIterator iter)
A Helper function that pours all elements of a iterator into a Array
|
static short[] |
pour(ShortIterator iter,
int max)
A Helper function that pours all elements of a iterator into a Array
|
static short[] |
quickSort(short[] 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(short[] 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(short[] 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(short[] array,
int from,
int to,
ShortComparator 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(short[] array,
int length,
ShortComparator 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 short[] |
quickSort(short[] array,
ShortComparator 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 short[] |
reverse(short[] array)
Simple Array Reversal method
|
static short[] |
reverse(short[] array,
int length)
Simple Array Reversal method
|
static short[] |
reverse(short[] array,
int offset,
int length)
Simple Array Reversal method
|
static short[] |
selectionSort(short[] array)
Sorts an array according to the natural ascending order using Selection Sort,
|
static void |
selectionSort(short[] array,
int length)
Sorts an array according to the natural ascending order using Selection Sort,
|
static void |
selectionSort(short[] array,
int from,
int to)
Sorts an array according to the natural ascending order using Selection Sort,
|
static void |
selectionSort(short[] array,
int from,
int to,
ShortComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Selection Sort,
|
static void |
selectionSort(short[] array,
int length,
ShortComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Selection Sort,
|
static short[] |
selectionSort(short[] array,
ShortComparator comp)
Sorts the specified range of elements according to the order induced by the specified comparator using Selection Sort,
|
static int |
shiftDown(short[] data,
int size,
int index,
ShortComparator comp)
Method to validate if the current value is the lowest value in the heap
|
static int |
shiftUp(short[] data,
int index,
ShortComparator comp)
Method to sort a specific value into the heap.
|
static short[] |
shuffle(short[] array)
Simple Shuffle method for Arrays.
|
static short[] |
shuffle(short[] array,
int length)
Simple Shuffle method for Arrays.
|
static short[] |
shuffle(short[] array,
int offset,
int length)
Simple Shuffle method for Arrays.
|
static short[] |
shuffle(short[] array,
int offset,
int length,
java.util.Random random)
Simple Shuffle method for Arrays.
|
static short[] |
shuffle(short[] array,
int length,
java.util.Random random)
Simple Shuffle method for Arrays.
|
static short[] |
shuffle(short[] array,
java.util.Random random)
Simple Shuffle method for Arrays.
|
static short[] |
stableSort(short[] 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(short[] 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(short[] 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(short[] array,
int from,
int to,
ShortComparator 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(short[] array,
int length,
ShortComparator 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 short[] |
stableSort(short[] array,
ShortComparator 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 short[] |
unstableSort(short[] 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(short[] 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(short[] 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(short[] array,
int from,
int to,
ShortComparator 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(short[] array,
int length,
ShortComparator 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 short[] |
unstableSort(short[] array,
ShortComparator 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 short[] |
unwrap(java.lang.Short[] a)
A Helper function to convert a Short Array to a short Array.
|
static short[] |
unwrap(java.lang.Short[] a,
int length)
A Helper function to convert a Short Array to a short Array.
|
static short[] |
unwrap(java.lang.Short[] a,
int offset,
int length)
A Helper function to convert a Short Array to a short Array.
|
static java.lang.Short[] |
wrap(short[] a)
A Helper function to convert a Primitive Array to a Short Array.
|
static java.lang.Short[] |
wrap(short[] a,
int length)
A Helper function to convert a Primitive Array to a Short Array.
|
static java.lang.Short[] |
wrap(short[] a,
int offset,
int length)
A Helper function to convert a Primitive Array to a Short Array.
|
public static final int BASE_THRESHOLD
public static final int PARALLEL_THRESHOLD
public static final short[] EMPTY_ARRAY
public static java.lang.Short[] wrap(short[] a)
a - the array that should be convertedpublic static java.lang.Short[] wrap(short[] a,
int length)
a - the array that should be convertedlength - the maximum length that should be covertedpublic static java.lang.Short[] wrap(short[] 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 short[] unwrap(java.lang.Short[] a)
a - the array that should be convertedpublic static short[] unwrap(java.lang.Short[] a,
int length)
a - the array that should be convertedlength - the maximum length that should be covertedpublic static short[] unwrap(java.lang.Short[] 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 short[] pour(ShortIterator iter)
iter - the elements that should be gathered.public static short[] pour(ShortIterator iter, int max)
iter - the elements that should be gathered.max - how many elements should be addedpublic static int shiftDown(short[] data,
int size,
int index,
ShortComparator 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(short[] data,
int index,
ShortComparator comp)
data - the heap itself.index - that should be heapified.comp - the comparator to sort the heap. Can be nullpublic static short[] heapify(short[] data,
int size,
ShortComparator 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 short[] shuffle(short[] array)
array - the elements that should be shuffledpublic static short[] shuffle(short[] array,
int length)
array - the elements that should be shuffledlength - the length of the arraypublic static short[] shuffle(short[] array,
int offset,
int length)
array - the elements that should be shuffledoffset - the start arraylength - the length of the arraypublic static short[] shuffle(short[] array,
java.util.Random random)
array - the elements that should be shuffledrandom - the Random Number Generator that should be used for the shufflingpublic static short[] shuffle(short[] array,
int length,
java.util.Random random)
array - the elements that should be shuffledlength - the length of the arrayrandom - the Random Number Generator that should be used for the shufflingpublic static short[] shuffle(short[] array,
int offset,
int length,
java.util.Random random)
array - the elements that should be shuffledoffset - the start arraylength - the length of the arrayrandom - the Random Number Generator that should be used for the shufflingpublic static short[] reverse(short[] array)
array - the Array that should flippublic static short[] reverse(short[] array,
int length)
array - the Array that should fliplength - the length of the arraypublic static short[] reverse(short[] array,
int offset,
int length)
array - the Array that should fliplength - the length of the arrayoffset - the start of the arraypublic static short[] stableSort(short[] array,
ShortComparator comp)
array - the array that needs to be sortedcomp - the Comparator that decides the sorting orderpublic static void stableSort(short[] array,
int length,
ShortComparator 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(short[] array,
int from,
int to,
ShortComparator 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 short[] stableSort(short[] array)
array - the array that needs to be sortedpublic static void stableSort(short[] array,
int length)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedpublic static void stableSort(short[] 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 short[] unstableSort(short[] array,
ShortComparator comp)
array - the array that needs to be sortedcomp - the Comparator that decides the sorting orderpublic static void unstableSort(short[] array,
int length,
ShortComparator 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(short[] array,
int from,
int to,
ShortComparator 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 short[] unstableSort(short[] array)
array - the array that needs to be sortedpublic static void unstableSort(short[] array,
int length)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedpublic static void unstableSort(short[] 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 short[] insertionSort(short[] array,
ShortComparator comp)
array - the array that needs to be sortedcomp - the Comparator that decides the sorting orderpublic static void insertionSort(short[] array,
int length,
ShortComparator 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(short[] array,
int from,
int to,
ShortComparator 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 short[] insertionSort(short[] array)
array - the array that needs to be sortedpublic static void insertionSort(short[] array,
int length)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedpublic static void insertionSort(short[] 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 short[] selectionSort(short[] array,
ShortComparator comp)
array - the array that needs to be sortedcomp - the Comparator that decides the sorting orderpublic static void selectionSort(short[] array,
int length,
ShortComparator 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(short[] array,
int from,
int to,
ShortComparator 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 short[] selectionSort(short[] array)
array - the array that needs to be sortedpublic static void selectionSort(short[] array,
int length)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedpublic static void selectionSort(short[] 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 short[] mergeSort(short[] array,
ShortComparator comp)
array - the array that needs to be sortedcomp - the Comparator that decides the sorting orderpublic static void mergeSort(short[] array,
int length,
ShortComparator 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(short[] array,
short[] supp,
int from,
int to,
ShortComparator 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 short[] mergeSort(short[] array)
array - the array that needs to be sortedpublic static void mergeSort(short[] array,
int length)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedpublic static void mergeSort(short[] array,
short[] 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(short[] array,
ShortComparator 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(short[] array,
int length,
ShortComparator 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(short[] array,
short[] supp,
int from,
int to,
ShortComparator 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(short[] 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(short[] 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(short[] array,
short[] 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(short[] array,
ShortComparator comp)
array - the array that needs to be sortedcomp - the Comparator that decides the sorting orderpublic static void memFreeMergeSort(short[] array,
int length,
ShortComparator 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(short[] array,
int from,
int to,
ShortComparator 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 short[] memFreeMergeSort(short[] array)
array - the array that needs to be sortedpublic static void memFreeMergeSort(short[] array,
int length)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedpublic static void memFreeMergeSort(short[] 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(short[] array,
ShortComparator 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(short[] array,
int length,
ShortComparator 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(short[] array,
int from,
int to,
ShortComparator 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(short[] 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(short[] 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(short[] 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 short[] quickSort(short[] array,
ShortComparator comp)
array - the array that needs to be sortedcomp - the Comparator that decides the sorting orderpublic static void quickSort(short[] array,
int length,
ShortComparator 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(short[] array,
int from,
int to,
ShortComparator 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 short[] quickSort(short[] array)
array - the array that needs to be sortedpublic static void quickSort(short[] array,
int length)
array - the array that needs to be sortedlength - the maxmium size of the array to be sortedpublic static void quickSort(short[] 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(short[] array,
ShortComparator 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(short[] array,
int length,
ShortComparator 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(short[] array,
int from,
int to,
ShortComparator 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(short[] 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(short[] 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(short[] 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