Class SortUtils
java.lang.Object
uk.ac.starlink.ttools.gpl.SortUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidintSort(int[] array, IntComparator cmp) Serial sort of an integer array with a custom comparator.static voidparallelIntSort(int[] array, Supplier<? extends IntComparator> cmpSupplier) Parallel sort of an integer array with a custom, possibly non-thread-safe, comparator.static voidparallelIntSort(int[] array, IntComparator cmp) Parallel sort of an integer array with a custom comparator.
-
Method Details
-
intSort
Serial sort of an integer array with a custom comparator.- Parameters:
array- array to sortcmp- comparator
-
parallelIntSort
Parallel sort of an integer array with a custom comparator.- Parameters:
array- array to sortcmp- comparator
-
parallelIntSort
Parallel sort of an integer array with a custom, possibly non-thread-safe, comparator. Any comparator obtained from the supplied factory will only be used within a single thread.- Parameters:
array- array to sortcmpSupplier- supplier for comparators
-