java.lang.Object
speiger.src.collections.booleans.utils.BooleanArrays
A Helper class for Arrays
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final intDefault Limit for Insertion/Selection Sortstatic final boolean[]Empty Array Reference used for Uninitialized Collectionsstatic final intDefault Threshold for Multithreaded Sorting Algorythm options -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic boolean[]heapify(boolean[] data, int size, BooleanComparator comp) Helper function to create a Heap out of an array.static boolean[]insertionSort(boolean[] array) Sorts an array according to the natural ascending order using InsertionSort,static voidinsertionSort(boolean[] array, int length) Sorts an array according to the natural ascending order using InsertionSort,static voidinsertionSort(boolean[] array, int from, int to) Sorts an array according to the natural ascending order using InsertionSort,static voidinsertionSort(boolean[] array, int from, int to, BooleanComparator comp) Sorts the specified range of elements according to the order induced by the specified comparator using Insertion Sort,static voidinsertionSort(boolean[] array, int length, BooleanComparator comp) Sorts the specified range of elements according to the order induced by the specified comparator using Insertion Sort,static boolean[]insertionSort(boolean[] array, BooleanComparator comp) Sorts the specified range of elements according to the order induced by the specified comparator using Insertion Sort,static boolean[]memFreeMergeSort(boolean[] 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 voidmemFreeMergeSort(boolean[] 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 voidmemFreeMergeSort(boolean[] 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 voidmemFreeMergeSort(boolean[] array, int from, int to, BooleanComparator 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 voidmemFreeMergeSort(boolean[] array, int length, BooleanComparator 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 voidmemFreeMergeSort(boolean[] array, BooleanComparator 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 boolean[]mergeSort(boolean[] array) Sorts an array according to the natural ascending order using Merge Sort, This implementation was copied from FastUtil with a couple custom optimizationsstatic voidmergeSort(boolean[] array, boolean[] 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 optimizationsstatic voidmergeSort(boolean[] array, boolean[] supp, int from, int to, BooleanComparator 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 optimizationsstatic voidmergeSort(boolean[] 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 optimizationsstatic voidmergeSort(boolean[] array, int length, BooleanComparator 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 optimizationsstatic boolean[]mergeSort(boolean[] array, BooleanComparator 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 optimizationsstatic voidparallelMemFreeMergeSort(boolean[] 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 voidparallelMemFreeMergeSort(boolean[] 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 voidparallelMemFreeMergeSort(boolean[] 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 voidparallelMemFreeMergeSort(boolean[] array, int from, int to, BooleanComparator 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 voidparallelMemFreeMergeSort(boolean[] array, int length, BooleanComparator 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 voidparallelMemFreeMergeSort(boolean[] array, BooleanComparator 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 voidparallelMergeSort(boolean[] array) Sorts an array according to the natural ascending order using Parallel Merge Sort, This implementation was copied from FastUtil with a couple custom optimizationsstatic voidparallelMergeSort(boolean[] array, boolean[] 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 optimizationsstatic voidparallelMergeSort(boolean[] array, boolean[] supp, int from, int to, BooleanComparator 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 optimizationsstatic voidparallelMergeSort(boolean[] 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 optimizationsstatic voidparallelMergeSort(boolean[] array, int length, BooleanComparator 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 optimizationsstatic voidparallelMergeSort(boolean[] array, BooleanComparator 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 optimizationsstatic voidparallelQuickSort(boolean[] 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 voidparallelQuickSort(boolean[] 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 voidparallelQuickSort(boolean[] 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 voidparallelQuickSort(boolean[] array, int from, int to, BooleanComparator 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 voidparallelQuickSort(boolean[] array, int length, BooleanComparator 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 voidparallelQuickSort(boolean[] array, BooleanComparator 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 boolean[]pour(BooleanIterator iter) A Helper function that pours all elements of a iterator into a Arraystatic boolean[]pour(BooleanIterator iter, int max) A Helper function that pours all elements of a iterator into a Arraystatic boolean[]quickSort(boolean[] 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 voidquickSort(boolean[] 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 voidquickSort(boolean[] 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 voidquickSort(boolean[] array, int from, int to, BooleanComparator 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 voidquickSort(boolean[] array, int length, BooleanComparator 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 boolean[]quickSort(boolean[] array, BooleanComparator 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 boolean[]reverse(boolean[] array) Simple Array Reversal methodstatic boolean[]reverse(boolean[] array, int length) Simple Array Reversal methodstatic boolean[]reverse(boolean[] array, int offset, int length) Simple Array Reversal methodstatic boolean[]selectionSort(boolean[] array) Sorts an array according to the natural ascending order using Selection Sort,static voidselectionSort(boolean[] array, int length) Sorts an array according to the natural ascending order using Selection Sort,static voidselectionSort(boolean[] array, int from, int to) Sorts an array according to the natural ascending order using Selection Sort,static voidselectionSort(boolean[] array, int from, int to, BooleanComparator comp) Sorts the specified range of elements according to the order induced by the specified comparator using Selection Sort,static voidselectionSort(boolean[] array, int length, BooleanComparator comp) Sorts the specified range of elements according to the order induced by the specified comparator using Selection Sort,static boolean[]selectionSort(boolean[] array, BooleanComparator comp) Sorts the specified range of elements according to the order induced by the specified comparator using Selection Sort,static intshiftDown(boolean[] data, int size, int index, BooleanComparator comp) Method to validate if the current value is the lowest value in the heapstatic intshiftUp(boolean[] data, int index, BooleanComparator comp) Method to sort a specific value into the heap.static boolean[]shuffle(boolean[] array) Simple Shuffle method for Arrays.static boolean[]shuffle(boolean[] array, int length) Simple Shuffle method for Arrays.static boolean[]shuffle(boolean[] array, int offset, int length) Simple Shuffle method for Arrays.static boolean[]shuffle(boolean[] array, int offset, int length, RandomGenerator random) Simple Shuffle method for Arrays.static boolean[]shuffle(boolean[] array, int length, RandomGenerator random) Simple Shuffle method for Arrays.static boolean[]shuffle(boolean[] array, RandomGenerator random) Simple Shuffle method for Arrays.static boolean[]stableSort(boolean[] 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 voidstableSort(boolean[] 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 voidstableSort(boolean[] 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 voidstableSort(boolean[] array, int from, int to, BooleanComparator 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 voidstableSort(boolean[] array, int length, BooleanComparator 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 boolean[]stableSort(boolean[] array, BooleanComparator 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 boolean[]unstableSort(boolean[] 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 voidunstableSort(boolean[] 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 voidunstableSort(boolean[] 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 voidunstableSort(boolean[] array, int from, int to, BooleanComparator 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 voidunstableSort(boolean[] array, int length, BooleanComparator 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 boolean[]unstableSort(boolean[] array, BooleanComparator 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 boolean[]A Helper function to convert a Boolean Array to a boolean Array.static boolean[]A Helper function to convert a Boolean Array to a boolean Array.static boolean[]A Helper function to convert a Boolean Array to a boolean Array.static Boolean[]wrap(boolean[] a) A Helper function to convert a Primitive Array to a Boolean Array.static Boolean[]wrap(boolean[] a, int length) A Helper function to convert a Primitive Array to a Boolean Array.static Boolean[]wrap(boolean[] a, int offset, int length) A Helper function to convert a Primitive Array to a Boolean Array.
-
Felddetails
-
BASE_THRESHOLD
public static final int BASE_THRESHOLDDefault Limit for Insertion/Selection Sort- Siehe auch:
-
PARALLEL_THRESHOLD
public static final int PARALLEL_THRESHOLDDefault Threshold for Multithreaded Sorting Algorythm options- Siehe auch:
-
EMPTY_ARRAY
public static final boolean[] EMPTY_ARRAYEmpty Array Reference used for Uninitialized Collections
-
-
Konstruktordetails
-
BooleanArrays
public BooleanArrays()
-
-
Methodendetails
-
wrap
A Helper function to convert a Primitive Array to a Boolean Array.- Parameter:
a- the array that should be converted- Gibt zurück:
- a Boolean Array of the input array.
-
wrap
A Helper function to convert a Primitive Array to a Boolean Array.- Parameter:
a- the array that should be convertedlength- the maximum length that should be coverted- Gibt zurück:
- a Boolean Array of the input array.
-
wrap
A Helper function to convert a Primitive Array to a Boolean Array.- Parameter:
a- the array that should be convertedoffset- the starting offset of the inputarraylength- the maximum length that should be coverted- Gibt zurück:
- a Boolean Array of the input array.
-
unwrap
A Helper function to convert a Boolean Array to a boolean Array.- Parameter:
a- the array that should be converted- Gibt zurück:
- a boolean Array of the input array.
-
unwrap
A Helper function to convert a Boolean Array to a boolean Array.- Parameter:
a- the array that should be convertedlength- the maximum length that should be coverted- Gibt zurück:
- a boolean Array of the input array.
-
unwrap
A Helper function to convert a Boolean Array to a boolean Array.- Parameter:
a- the array that should be convertedoffset- the starting offset of the inputarraylength- the maximum length that should be coverted- Gibt zurück:
- a boolean Array of the input array.
-
pour
A Helper function that pours all elements of a iterator into a Array- Parameter:
iter- the elements that should be gathered.- Gibt zurück:
- array with all elements of the iterator
-
pour
A Helper function that pours all elements of a iterator into a Array- Parameter:
iter- the elements that should be gathered.max- how many elements should be added- Gibt zurück:
- array with all requested elements of the iterator
-
shiftDown
Method to validate if the current value is the lowest value in the heap- Parameter:
data- the current heap.size- the size of the heapindex- the index that should be validatedcomp- the comparator to sort the heap. Can be null- Gibt zurück:
- the index the element was shifted to
-
shiftUp
Method to sort a specific value into the heap.- Parameter:
data- the heap itself.index- that should be heapified.comp- the comparator to sort the heap. Can be null- Gibt zurück:
- the index the element was shifted to
-
heapify
Helper function to create a Heap out of an array.- Parameter:
data- the array to heapifysize- the current size of elements within the array.comp- the Comparator to sort the array. Can be null- Gibt zurück:
- the input array
-
shuffle
public static boolean[] shuffle(boolean[] array) Simple Shuffle method for Arrays.- Parameter:
array- the elements that should be shuffled- Gibt zurück:
- the provided sorted array
- Note:
- This uses the SanityChecks#getRandom
-
shuffle
public static boolean[] shuffle(boolean[] array, int length) Simple Shuffle method for Arrays.- Parameter:
array- the elements that should be shuffledlength- the length of the array- Gibt zurück:
- the provided sorted array
- Note:
- This uses the SanityChecks#getRandom
-
shuffle
public static boolean[] shuffle(boolean[] array, int offset, int length) Simple Shuffle method for Arrays.- Parameter:
array- the elements that should be shuffledoffset- the start arraylength- the length of the array- Gibt zurück:
- the provided sorted array
- Note:
- This uses the SanityChecks#getRandom
-
shuffle
Simple Shuffle method for Arrays.- Parameter:
array- the elements that should be shuffledrandom- the Random Number Generator that should be used for the shuffling- Gibt zurück:
- the provided sorted array
-
shuffle
Simple Shuffle method for Arrays.- Parameter:
array- the elements that should be shuffledlength- the length of the arrayrandom- the Random Number Generator that should be used for the shuffling- Gibt zurück:
- the provided sorted array
-
shuffle
Simple Shuffle method for Arrays.- Parameter:
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 shuffling- Gibt zurück:
- the provided sorted array
-
reverse
public static boolean[] reverse(boolean[] array) Simple Array Reversal method- Parameter:
array- the Array that should flip- Gibt zurück:
- the provided array
-
reverse
public static boolean[] reverse(boolean[] array, int length) Simple Array Reversal method- Parameter:
array- the Array that should fliplength- the length of the array- Gibt zurück:
- the provided array
-
reverse
public static boolean[] reverse(boolean[] array, int offset, int length) Simple Array Reversal method- Parameter:
array- the Array that should flipoffset- the start of the arraylength- the length of the array- Gibt zurück:
- the provided array
-
stableSort
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. Stable sort referres to Mergesort or Insertionsort- Parameter:
array- the array that needs to be sortedcomp- the Comparator that decides the sorting order- Gibt zurück:
- input array.
-
stableSort
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. Stable sort referres to Mergesort or Insertionsort- Parameter:
array- the array that needs to be sortedlength- the maxmium size of the array to be sortedcomp- the Comparator that decides the sorting order
-
stableSort
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. Stable sort referres to Mergesort or Insertionsort- Parameter:
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 order
-
stableSort
public static boolean[] stableSort(boolean[] array) Sorts an array according to the natural ascending order, potentially dynamically choosing an appropriate algorithm given the type and size of the array. Stable sort referres to Mergesort or Insertionsort- Parameter:
array- the array that needs to be sorted- Gibt zurück:
- input array
-
stableSort
public static void stableSort(boolean[] 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. Stable sort referres to Mergesort or Insertionsort- Parameter:
array- the array that needs to be sortedlength- the maxmium size of the array to be sorted
-
stableSort
public static void stableSort(boolean[] 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. Stable sort referres to Mergesort or Insertionsort- Parameter:
array- the array that needs to be sortedfrom- where the array should be sorted fromto- where the array should be sorted to
-
unstableSort
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. Unstable sort referres to QuickSort or SelectionSort- Parameter:
array- the array that needs to be sortedcomp- the Comparator that decides the sorting order- Gibt zurück:
- input array
-
unstableSort
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. Unstable sort referres to QuickSort or SelectionSort- Parameter:
array- the array that needs to be sortedlength- the maxmium size of the array to be sortedcomp- the Comparator that decides the sorting order
-
unstableSort
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. Unstable sort referres to QuickSort or SelectionSort- Parameter:
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 order
-
unstableSort
public static boolean[] unstableSort(boolean[] array) Sorts an array according to the natural ascending order, potentially dynamically choosing an appropriate algorithm given the type and size of the array. Unstable sort referres to QuickSort or SelectionSort- Parameter:
array- the array that needs to be sorted- Gibt zurück:
- input array
-
unstableSort
public static void unstableSort(boolean[] 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. Unstable sort referres to QuickSort or SelectionSort- Parameter:
array- the array that needs to be sortedlength- the maxmium size of the array to be sorted
-
unstableSort
public static void unstableSort(boolean[] 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. Unstable sort referres to QuickSort or SelectionSort- Parameter:
array- the array that needs to be sortedfrom- where the array should be sorted fromto- where the array should be sorted to
-
insertionSort
Sorts the specified range of elements according to the order induced by the specified comparator using Insertion Sort,- Parameter:
array- the array that needs to be sortedcomp- the Comparator that decides the sorting order- Gibt zurück:
- input array
-
insertionSort
Sorts the specified range of elements according to the order induced by the specified comparator using Insertion Sort,- Parameter:
array- the array that needs to be sortedlength- the maxmium size of the array to be sortedcomp- the Comparator that decides the sorting order
-
insertionSort
Sorts the specified range of elements according to the order induced by the specified comparator using Insertion Sort,- Parameter:
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 order
-
insertionSort
public static boolean[] insertionSort(boolean[] array) Sorts an array according to the natural ascending order using InsertionSort,- Parameter:
array- the array that needs to be sorted- Gibt zurück:
- input array
-
insertionSort
public static void insertionSort(boolean[] array, int length) Sorts an array according to the natural ascending order using InsertionSort,- Parameter:
array- the array that needs to be sortedlength- the maxmium size of the array to be sorted
-
insertionSort
public static void insertionSort(boolean[] array, int from, int to) Sorts an array according to the natural ascending order using InsertionSort,- Parameter:
array- the array that needs to be sortedfrom- where the array should be sorted fromto- where the array should be sorted to
-
selectionSort
Sorts the specified range of elements according to the order induced by the specified comparator using Selection Sort,- Parameter:
array- the array that needs to be sortedcomp- the Comparator that decides the sorting order- Gibt zurück:
- input array
-
selectionSort
Sorts the specified range of elements according to the order induced by the specified comparator using Selection Sort,- Parameter:
array- the array that needs to be sortedlength- the maxmium size of the array to be sortedcomp- the Comparator that decides the sorting order
-
selectionSort
Sorts the specified range of elements according to the order induced by the specified comparator using Selection Sort,- Parameter:
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 order
-
selectionSort
public static boolean[] selectionSort(boolean[] array) Sorts an array according to the natural ascending order using Selection Sort,- Parameter:
array- the array that needs to be sorted- Gibt zurück:
- input array
-
selectionSort
public static void selectionSort(boolean[] array, int length) Sorts an array according to the natural ascending order using Selection Sort,- Parameter:
array- the array that needs to be sortedlength- the maxmium size of the array to be sorted
-
selectionSort
public static void selectionSort(boolean[] array, int from, int to) Sorts an array according to the natural ascending order using Selection Sort,- Parameter:
array- the array that needs to be sortedfrom- where the array should be sorted fromto- where the array should be sorted to
-
mergeSort
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- Parameter:
array- the array that needs to be sortedcomp- the Comparator that decides the sorting order- Gibt zurück:
- input array
-
mergeSort
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- Parameter:
array- the array that needs to be sortedlength- the maxmium size of the array to be sortedcomp- the Comparator that decides the sorting order
-
mergeSort
public static void mergeSort(boolean[] array, boolean[] supp, int from, int to, BooleanComparator 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- Parameter:
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 order
-
mergeSort
public static boolean[] mergeSort(boolean[] array) Sorts an array according to the natural ascending order using Merge Sort, This implementation was copied from FastUtil with a couple custom optimizations- Parameter:
array- the array that needs to be sorted- Gibt zurück:
- input array
-
mergeSort
public static void mergeSort(boolean[] 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- Parameter:
array- the array that needs to be sortedlength- the maxmium size of the array to be sorted
-
mergeSort
public static void mergeSort(boolean[] array, boolean[] 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- Parameter:
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 to
-
parallelMergeSort
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- Parameter:
array- the array that needs to be sortedcomp- the Comparator that decides the sorting order- Note:
- This parallelization is invoked through
SanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>)which the threadpool can be changed as needed
-
parallelMergeSort
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- Parameter:
array- the array that needs to be sortedlength- the maxmium size of the array to be sortedcomp- the Comparator that decides the sorting order- Note:
- This parallelization is invoked through
SanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>)which the threadpool can be changed as needed
-
parallelMergeSort
public static void parallelMergeSort(boolean[] array, boolean[] supp, int from, int to, BooleanComparator 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- Parameter:
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 order- Note:
- This parallelization is invoked through
SanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>)which the threadpool can be changed as needed
-
parallelMergeSort
public static void parallelMergeSort(boolean[] 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- Parameter:
array- the array that needs to be sorted- Note:
- This parallelization is invoked through
SanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>)which the threadpool can be changed as needed
-
parallelMergeSort
public static void parallelMergeSort(boolean[] 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- Parameter:
array- the array that needs to be sortedlength- the maxmium size of the array to be sorted- Note:
- This parallelization is invoked through
SanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>)which the threadpool can be changed as needed
-
parallelMergeSort
public static void parallelMergeSort(boolean[] array, boolean[] 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- Parameter:
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 to- Note:
- This parallelization is invoked through
SanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>)which the threadpool can be changed as needed
-
memFreeMergeSort
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. It is in Very Unsorted Instances 50% slower then Mergesort, otherwise it as fast.- Parameter:
array- the array that needs to be sortedcomp- the Comparator that decides the sorting order
-
memFreeMergeSort
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. It is in Very Unsorted Instances 50% slower then Mergesort, otherwise it as fast.- Parameter:
array- the array that needs to be sortedlength- the maxmium size of the array to be sortedcomp- the Comparator that decides the sorting order
-
memFreeMergeSort
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. It is in Very Unsorted Instances 50% slower then Mergesort, otherwise it as fast.- Parameter:
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 order
-
memFreeMergeSort
public static boolean[] memFreeMergeSort(boolean[] 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. It is depending on the size and the unsorted level of the input array slower or almost as fast as normal merge sort. Depending on the test size i can be 0.5x slower (5000 elements) or 4x slower (50000 elements) under the assumtion that the array is in its worst case scenario. It does stack allocate tiny amounts of data for shifting around elements.- Parameter:
array- the array that needs to be sorted- Gibt zurück:
- input array
-
memFreeMergeSort
public static void memFreeMergeSort(boolean[] 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. It is depending on the size and the unsorted level of the input array slower or almost as fast as normal merge sort. Depending on the test size i can be 0.5x slower (5000 elements) or 4x slower (50000 elements) under the assumtion that the array is in its worst case scenario. It does stack allocate tiny amounts of data for shifting around elements.- Parameter:
array- the array that needs to be sortedlength- the maxmium size of the array to be sorted
-
memFreeMergeSort
public static void memFreeMergeSort(boolean[] 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. It is depending on the size and the unsorted level of the input array slower or almost as fast as normal merge sort. Depending on the test size i can be 0.5x slower (5000 elements) or 4x slower (50000 elements) under the assumtion that the array is in its worst case scenario. It does stack allocate tiny amounts of data for shifting around elements.- Parameter:
array- the array that needs to be sortedfrom- where the array should be sorted fromto- where the array should be sorted to
-
parallelMemFreeMergeSort
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. It is depending on the size and the unsorted level of the input array slower or almost as fast as normal merge sort. Depending on the test size i can be 0.5x slower (5000 elements) or 4x slower (50000 elements) under the assumtion that the array is in its worst case scenario. It does stack allocate tiny amounts of data for shifting around elements.- Parameter:
array- the array that needs to be sortedcomp- the Comparator that decides the sorting order- Note:
- This parallelization is invoked through
SanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>)which the threadpool can be changed as needed
-
parallelMemFreeMergeSort
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. It is depending on the size and the unsorted level of the input array slower or almost as fast as normal merge sort. Depending on the test size i can be 0.5x slower (5000 elements) or 4x slower (50000 elements) under the assumtion that the array is in its worst case scenario. It does stack allocate tiny amounts of data for shifting around elements.- Parameter:
array- the array that needs to be sortedlength- the maxmium size of the array to be sortedcomp- the Comparator that decides the sorting order- Note:
- This parallelization is invoked through
SanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>)which the threadpool can be changed as needed
-
parallelMemFreeMergeSort
public static void parallelMemFreeMergeSort(boolean[] array, int from, int to, BooleanComparator 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. It is depending on the size and the unsorted level of the input array slower or almost as fast as normal merge sort. Depending on the test size i can be 0.5x slower (5000 elements) or 4x slower (50000 elements) under the assumtion that the array is in its worst case scenario. It does stack allocate tiny amounts of data for shifting around elements.- Parameter:
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 order- Note:
- This parallelization is invoked through
SanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>)which the threadpool can be changed as needed
-
parallelMemFreeMergeSort
public static void parallelMemFreeMergeSort(boolean[] 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. It is depending on the size and the unsorted level of the input array slower or almost as fast as normal merge sort. Depending on the test size i can be 0.5x slower (5000 elements) or 4x slower (50000 elements) under the assumtion that the array is in its worst case scenario. It does stack allocate tiny amounts of data for shifting around elements.- Parameter:
array- the array that needs to be sorted- Note:
- This parallelization is invoked through
SanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>)which the threadpool can be changed as needed
-
parallelMemFreeMergeSort
public static void parallelMemFreeMergeSort(boolean[] 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. It is depending on the size and the unsorted level of the input array slower or almost as fast as normal merge sort. Depending on the test size i can be 0.5x slower (5000 elements) or 4x slower (50000 elements) under the assumtion that the array is in its worst case scenario. It does stack allocate tiny amounts of data for shifting around elements.- Parameter:
array- the array that needs to be sortedlength- the maxmium size of the array to be sorted- Note:
- This parallelization is invoked through
SanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>)which the threadpool can be changed as needed
-
parallelMemFreeMergeSort
public static void parallelMemFreeMergeSort(boolean[] 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. It is depending on the size and the unsorted level of the input array slower or almost as fast as normal merge sort. Depending on the test size i can be 0.5x slower (5000 elements) or 4x slower (50000 elements) under the assumtion that the array is in its worst case scenario. It does stack allocate tiny amounts of data for shifting around elements.- Parameter:
array- the array that needs to be sortedfrom- where the array should be sorted fromto- where the array should be sorted to- Note:
- This parallelization is invoked through
SanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>)which the threadpool can be changed as needed
-
quickSort
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. Bentley and M. DouglasMcIlroy, "Engineering a Sort Function", Software: Practice and Experience, 23(11), pages1249−1265, 1993.- Parameter:
array- the array that needs to be sortedcomp- the Comparator that decides the sorting order- Gibt zurück:
- input array
-
quickSort
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. Bentley and M. DouglasMcIlroy, "Engineering a Sort Function", Software: Practice and Experience, 23(11), pages1249−1265, 1993.- Parameter:
array- the array that needs to be sortedlength- the maxmium size of the array to be sortedcomp- the Comparator that decides the sorting order
-
quickSort
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. Bentley and M. DouglasMcIlroy, "Engineering a Sort Function", Software: Practice and Experience, 23(11), pages1249−1265, 1993.- Parameter:
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 order
-
quickSort
public static boolean[] quickSort(boolean[] 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. Bentley and M. DouglasMcIlroy, "Engineering a Sort Function", Software: Practice and Experience, 23(11), pages1249−1265, 1993.- Parameter:
array- the array that needs to be sorted- Gibt zurück:
- input array
-
quickSort
public static void quickSort(boolean[] 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. Bentley and M. DouglasMcIlroy, "Engineering a Sort Function", Software: Practice and Experience, 23(11), pages1249−1265, 1993.- Parameter:
array- the array that needs to be sortedlength- the maxmium size of the array to be sorted
-
quickSort
public static void quickSort(boolean[] 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. Bentley and M. DouglasMcIlroy, "Engineering a Sort Function", Software: Practice and Experience, 23(11), pages1249−1265, 1993.- Parameter:
array- the array that needs to be sortedfrom- where the array should be sorted fromto- where the array should be sorted to
-
parallelQuickSort
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. Bentley and M. DouglasMcIlroy, "Engineering a Sort Function", Software: Practice and Experience, 23(11), pages1249−1265, 1993.- Parameter:
array- the array that needs to be sortedcomp- the Comparator that decides the sorting order- Note:
- This parallelization is invoked through
SanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>)which the threadpool can be changed as needed
-
parallelQuickSort
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. Bentley and M. DouglasMcIlroy, "Engineering a Sort Function", Software: Practice and Experience, 23(11), pages1249−1265, 1993.- Parameter:
array- the array that needs to be sortedlength- the maxmium size of the array to be sortedcomp- the Comparator that decides the sorting order- Note:
- This parallelization is invoked through
SanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>)which the threadpool can be changed as needed
-
parallelQuickSort
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. Bentley and M. DouglasMcIlroy, "Engineering a Sort Function", Software: Practice and Experience, 23(11), pages1249−1265, 1993.- Parameter:
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 order- Note:
- This parallelization is invoked through
SanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>)which the threadpool can be changed as needed
-
parallelQuickSort
public static void parallelQuickSort(boolean[] 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. Bentley and M. DouglasMcIlroy, "Engineering a Sort Function", Software: Practice and Experience, 23(11), pages1249−1265, 1993.- Parameter:
array- the array that needs to be sorted- Note:
- This parallelization is invoked through
SanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>)which the threadpool can be changed as needed
-
parallelQuickSort
public static void parallelQuickSort(boolean[] 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. Bentley and M. DouglasMcIlroy, "Engineering a Sort Function", Software: Practice and Experience, 23(11), pages1249−1265, 1993.- Parameter:
array- the array that needs to be sortedlength- the maxmium size of the array to be sorted- Note:
- This parallelization is invoked through
SanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>)which the threadpool can be changed as needed
-
parallelQuickSort
public static void parallelQuickSort(boolean[] 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. Bentley and M. DouglasMcIlroy, "Engineering a Sort Function", Software: Practice and Experience, 23(11), pages1249−1265, 1993.- Parameter:
array- the array that needs to be sortedfrom- where the array should be sorted fromto- where the array should be sorted to- Note:
- This parallelization is invoked through
SanityChecks.invokeTask(java.util.concurrent.ForkJoinTask<T>)which the threadpool can be changed as needed
-