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