java.lang.Object
speiger.src.collections.objects.utils.ObjectArrays

public class ObjectArrays extends Object
A Helper class for Arrays
  • Feldübersicht

    Felder
    Modifizierer und Typ
    Feld
    Beschreibung
    static final int
    Default Limit for Insertion/Selection Sort
    static final Object[]
    Empty Array Reference used for Uninitialized Collections
    static final int
    Default Threshold for Multithreaded Sorting Algorythm options
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    static <T> T[]
    heapify(T[] data, int size, Comparator<? super T> comp)
    Helper function to create a Heap out of an array.
    static <T> T[]
    insertionSort(T[] array)
    Sorts an array according to the natural ascending order using InsertionSort,
    static <T> void
    insertionSort(T[] array, int length)
    Sorts an array according to the natural ascending order using InsertionSort,
    static <T> void
    insertionSort(T[] array, int from, int to)
    Sorts an array according to the natural ascending order using InsertionSort,
    static <T> void
    insertionSort(T[] array, int from, int to, Comparator<T> comp)
    Sorts the specified range of elements according to the order induced by the specified comparator using Insertion Sort,
    static <T> void
    insertionSort(T[] array, int length, Comparator<T> comp)
    Sorts the specified range of elements according to the order induced by the specified comparator using Insertion Sort,
    static <T> T[]
    insertionSort(T[] array, Comparator<T> comp)
    Sorts the specified range of elements according to the order induced by the specified comparator using Insertion Sort,
    static <T> T[]
    memFreeMergeSort(T[] 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 <T> void
    memFreeMergeSort(T[] 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 <T> void
    memFreeMergeSort(T[] 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 <T> void
    memFreeMergeSort(T[] array, int from, int to, Comparator<T> 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 <T> void
    memFreeMergeSort(T[] array, int length, Comparator<T> 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 <T> void
    memFreeMergeSort(T[] array, Comparator<T> 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 <T> T[]
    mergeSort(T[] 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 <T> void
    mergeSort(T[] 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 <T> void
    mergeSort(T[] array, int length, Comparator<T> 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 <T> T[]
    mergeSort(T[] array, Comparator<T> 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 <T> void
    mergeSort(T[] array, T[] 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 <T> void
    mergeSort(T[] array, T[] supp, int from, int to, Comparator<T> 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 <T> T[]
    newArray(Class<T> clz, int length)
    Function to create a new Array of a given size
    static <T> void
    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 <T> void
    parallelMemFreeMergeSort(T[] 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 <T> void
    parallelMemFreeMergeSort(T[] 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 <T> void
    parallelMemFreeMergeSort(T[] array, int from, int to, Comparator<T> 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 <T> void
    parallelMemFreeMergeSort(T[] array, int length, Comparator<T> 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 <T> void
    parallelMemFreeMergeSort(T[] array, Comparator<T> 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 <T> void
    parallelMergeSort(T[] 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 <T> void
    parallelMergeSort(T[] 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 <T> void
    parallelMergeSort(T[] array, int length, Comparator<T> 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 <T> void
    parallelMergeSort(T[] array, Comparator<T> 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 <T> void
    parallelMergeSort(T[] array, T[] 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 <T> void
    parallelMergeSort(T[] array, T[] supp, int from, int to, Comparator<T> 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 <T> void
    parallelQuickSort(T[] 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 <T> void
    parallelQuickSort(T[] 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 <T> void
    parallelQuickSort(T[] 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 <T> void
    parallelQuickSort(T[] array, int from, int to, Comparator<T> 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 <T> void
    parallelQuickSort(T[] array, int length, Comparator<T> 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 <T> void
    parallelQuickSort(T[] array, Comparator<T> 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 <T> T[]
    A Helper function that pours all elements of a iterator into a Array
    static <T> T[]
    pour(ObjectIterator<T> iter, int max)
    A Helper function that pours all elements of a iterator into a Array
    static <T, E> E[]
    pour(ObjectIterator<T> iter, int max, IntFunction<E[]> action)
    A Helper function that pours all elements of a iterator into a Array
    static <T, E> E[]
    pour(ObjectIterator<T> iter, IntFunction<E[]> action)
    A Helper function that pours all elements of a iterator into a Array
    static <T> T[]
    quickSort(T[] 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 <T> void
    quickSort(T[] 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 <T> void
    quickSort(T[] 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 <T> void
    quickSort(T[] array, int from, int to, Comparator<T> 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 <T> void
    quickSort(T[] array, int length, Comparator<T> 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 <T> T[]
    quickSort(T[] array, Comparator<T> 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 <T> T[]
    reverse(T[] array)
    Simple Array Reversal method
    static <T> T[]
    reverse(T[] array, int length)
    Simple Array Reversal method
    static <T> T[]
    reverse(T[] array, int offset, int length)
    Simple Array Reversal method
    static <T> T[]
    selectionSort(T[] array)
    Sorts an array according to the natural ascending order using Selection Sort,
    static <T> void
    selectionSort(T[] array, int length)
    Sorts an array according to the natural ascending order using Selection Sort,
    static <T> void
    selectionSort(T[] array, int from, int to)
    Sorts an array according to the natural ascending order using Selection Sort,
    static <T> void
    selectionSort(T[] array, int from, int to, Comparator<T> comp)
    Sorts the specified range of elements according to the order induced by the specified comparator using Selection Sort,
    static <T> void
    selectionSort(T[] array, int length, Comparator<T> comp)
    Sorts the specified range of elements according to the order induced by the specified comparator using Selection Sort,
    static <T> T[]
    selectionSort(T[] array, Comparator<T> comp)
    Sorts the specified range of elements according to the order induced by the specified comparator using Selection Sort,
    static <T> int
    shiftDown(T[] data, int size, int index, Comparator<? super T> comp)
    Method to validate if the current value is the lowest value in the heap
    static <T> int
    shiftUp(T[] data, int index, Comparator<? super T> comp)
    Method to sort a specific value into the heap.
    static <T> T[]
    shuffle(T[] array)
    Simple Shuffle method for Arrays.
    static <T> T[]
    shuffle(T[] array, int length)
    Simple Shuffle method for Arrays.
    static <T> T[]
    shuffle(T[] array, int offset, int length)
    Simple Shuffle method for Arrays.
    static <T> T[]
    shuffle(T[] array, int offset, int length, RandomGenerator random)
    Simple Shuffle method for Arrays.
    static <T> T[]
    shuffle(T[] array, int length, RandomGenerator random)
    Simple Shuffle method for Arrays.
    static <T> T[]
    shuffle(T[] array, RandomGenerator random)
    Simple Shuffle method for Arrays.
    static <T> T[]
    stableSort(T[] 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 <T> void
    stableSort(T[] 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 <T> void
    stableSort(T[] 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 <T> void
    stableSort(T[] array, int from, int to, Comparator<T> 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 <T> void
    stableSort(T[] array, int length, Comparator<T> 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 <T> T[]
    stableSort(T[] array, Comparator<T> 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 <T> T[]
    unstableSort(T[] 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 <T> void
    unstableSort(T[] 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 <T> void
    unstableSort(T[] 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 <T> void
    unstableSort(T[] array, int from, int to, Comparator<T> 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 <T> void
    unstableSort(T[] array, int length, Comparator<T> 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 <T> T[]
    unstableSort(T[] array, Comparator<T> 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.

    Von Klasse geerbte Methoden java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Felddetails

    • BASE_THRESHOLD

      public static final int BASE_THRESHOLD
      Default Limit for Insertion/Selection Sort
      Siehe auch:
    • PARALLEL_THRESHOLD

      public static final int PARALLEL_THRESHOLD
      Default Threshold for Multithreaded Sorting Algorythm options
      Siehe auch:
    • EMPTY_ARRAY

      public static final Object[] EMPTY_ARRAY
      Empty Array Reference used for Uninitialized Collections
  • Konstruktordetails

    • ObjectArrays

      public ObjectArrays()
  • Methodendetails

    • newArray

      public static <T> T[] newArray(Class<T> clz, int length)
      Function to create a new Array of a given size
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      clz - the class type of array that is requested
      length - the lenght the array should be.
      Gibt zurück:
      a Array with the requested type and length
    • pour

      public static <T> T[] pour(ObjectIterator<T> iter)
      A Helper function that pours all elements of a iterator into a Array
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      iter - the elements that should be gathered.
      Gibt zurück:
      array with all elements of the iterator
    • pour

      public static <T> T[] pour(ObjectIterator<T> iter, int max)
      A Helper function that pours all elements of a iterator into a Array
      Typparameter:
      T - the keyType of array that the operation should be applied
      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
    • pour

      public static <T, E> E[] pour(ObjectIterator<T> iter, IntFunction<E[]> action)
      A Helper function that pours all elements of a iterator into a Array
      Typparameter:
      T - the keyType of array that the operation should be applied
      E - the keyType of array that the operation should be applied
      Parameter:
      iter - the elements that should be gathered.
      action - that is creating the Array to be poured into
      Gibt zurück:
      array with all elements of the iterator
    • pour

      public static <T, E> E[] pour(ObjectIterator<T> iter, int max, IntFunction<E[]> action)
      A Helper function that pours all elements of a iterator into a Array
      Typparameter:
      T - the keyType of array that the operation should be applied
      E - the keyType of array that the operation should be applied
      Parameter:
      iter - the elements that should be gathered.
      max - how many elements should be added
      action - that is creating the Array to be poured into
      Gibt zurück:
      array with all requested elements of the iterator
    • shiftDown

      public static <T> int shiftDown(T[] data, int size, int index, Comparator<? super T> comp)
      Method to validate if the current value is the lowest value in the heap
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      data - the current heap.
      size - the size of the heap
      index - the index that should be validated
      comp - the comparator to sort the heap. Can be null
      Gibt zurück:
      the index the element was shifted to
    • shiftUp

      public static <T> int shiftUp(T[] data, int index, Comparator<? super T> comp)
      Method to sort a specific value into the heap.
      Typparameter:
      T - the keyType of array that the operation should be applied
      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

      public static <T> T[] heapify(T[] data, int size, Comparator<? super T> comp)
      Helper function to create a Heap out of an array.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      data - the array to heapify
      size - 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 <T> T[] shuffle(T[] array)
      Simple Shuffle method for Arrays.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the elements that should be shuffled
      Gibt zurück:
      the provided sorted array
      Note:
      This uses the SanityChecks#getRandom
    • shuffle

      public static <T> T[] shuffle(T[] array, int length)
      Simple Shuffle method for Arrays.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the elements that should be shuffled
      length - the length of the array
      Gibt zurück:
      the provided sorted array
      Note:
      This uses the SanityChecks#getRandom
    • shuffle

      public static <T> T[] shuffle(T[] array, int offset, int length)
      Simple Shuffle method for Arrays.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the elements that should be shuffled
      offset - the start array
      length - the length of the array
      Gibt zurück:
      the provided sorted array
      Note:
      This uses the SanityChecks#getRandom
    • shuffle

      public static <T> T[] shuffle(T[] array, RandomGenerator random)
      Simple Shuffle method for Arrays.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the elements that should be shuffled
      random - the Random Number Generator that should be used for the shuffling
      Gibt zurück:
      the provided sorted array
    • shuffle

      public static <T> T[] shuffle(T[] array, int length, RandomGenerator random)
      Simple Shuffle method for Arrays.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the elements that should be shuffled
      length - the length of the array
      random - the Random Number Generator that should be used for the shuffling
      Gibt zurück:
      the provided sorted array
    • shuffle

      public static <T> T[] shuffle(T[] array, int offset, int length, RandomGenerator random)
      Simple Shuffle method for Arrays.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the elements that should be shuffled
      offset - the start array
      length - the length of the array
      random - the Random Number Generator that should be used for the shuffling
      Gibt zurück:
      the provided sorted array
    • reverse

      public static <T> T[] reverse(T[] array)
      Simple Array Reversal method
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the Array that should flip
      Gibt zurück:
      the provided array
    • reverse

      public static <T> T[] reverse(T[] array, int length)
      Simple Array Reversal method
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the Array that should flip
      length - the length of the array
      Gibt zurück:
      the provided array
    • reverse

      public static <T> T[] reverse(T[] array, int offset, int length)
      Simple Array Reversal method
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the Array that should flip
      offset - the start of the array
      length - the length of the array
      Gibt zurück:
      the provided array
    • stableSort

      public static <T> T[] stableSort(T[] array, Comparator<T> 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. Stable sort referres to Mergesort or Insertionsort
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      comp - the Comparator that decides the sorting order
      Gibt zurück:
      input array.
    • stableSort

      public static <T> void stableSort(T[] array, int length, Comparator<T> 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. Stable sort referres to Mergesort or Insertionsort
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      length - the maxmium size of the array to be sorted
      comp - the Comparator that decides the sorting order
    • stableSort

      public static <T> void stableSort(T[] array, int from, int to, Comparator<T> 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. Stable sort referres to Mergesort or Insertionsort
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      from - where the array should be sorted from
      to - where the array should be sorted to
      comp - the Comparator that decides the sorting order
    • stableSort

      public static <T> T[] stableSort(T[] 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
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      Gibt zurück:
      input array
    • stableSort

      public static <T> void stableSort(T[] 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
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      length - the maxmium size of the array to be sorted
    • stableSort

      public static <T> void stableSort(T[] 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
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      from - where the array should be sorted from
      to - where the array should be sorted to
    • unstableSort

      public static <T> T[] unstableSort(T[] array, Comparator<T> 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. Unstable sort referres to QuickSort or SelectionSort
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      comp - the Comparator that decides the sorting order
      Gibt zurück:
      input array
    • unstableSort

      public static <T> void unstableSort(T[] array, int length, Comparator<T> 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. Unstable sort referres to QuickSort or SelectionSort
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      length - the maxmium size of the array to be sorted
      comp - the Comparator that decides the sorting order
    • unstableSort

      public static <T> void unstableSort(T[] array, int from, int to, Comparator<T> 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. Unstable sort referres to QuickSort or SelectionSort
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      from - where the array should be sorted from
      to - where the array should be sorted to
      comp - the Comparator that decides the sorting order
    • unstableSort

      public static <T> T[] unstableSort(T[] 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
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      Gibt zurück:
      input array
    • unstableSort

      public static <T> void unstableSort(T[] 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
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      length - the maxmium size of the array to be sorted
    • unstableSort

      public static <T> void unstableSort(T[] 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
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      from - where the array should be sorted from
      to - where the array should be sorted to
    • insertionSort

      public static <T> T[] insertionSort(T[] array, Comparator<T> comp)
      Sorts the specified range of elements according to the order induced by the specified comparator using Insertion Sort,
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      comp - the Comparator that decides the sorting order
      Gibt zurück:
      input array
    • insertionSort

      public static <T> void insertionSort(T[] array, int length, Comparator<T> comp)
      Sorts the specified range of elements according to the order induced by the specified comparator using Insertion Sort,
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      length - the maxmium size of the array to be sorted
      comp - the Comparator that decides the sorting order
    • insertionSort

      public static <T> void insertionSort(T[] array, int from, int to, Comparator<T> comp)
      Sorts the specified range of elements according to the order induced by the specified comparator using Insertion Sort,
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      from - where the array should be sorted from
      to - where the array should be sorted to
      comp - the Comparator that decides the sorting order
    • insertionSort

      public static <T> T[] insertionSort(T[] array)
      Sorts an array according to the natural ascending order using InsertionSort,
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      Gibt zurück:
      input array
    • insertionSort

      public static <T> void insertionSort(T[] array, int length)
      Sorts an array according to the natural ascending order using InsertionSort,
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      length - the maxmium size of the array to be sorted
    • insertionSort

      public static <T> void insertionSort(T[] array, int from, int to)
      Sorts an array according to the natural ascending order using InsertionSort,
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      from - where the array should be sorted from
      to - where the array should be sorted to
    • selectionSort

      public static <T> T[] selectionSort(T[] array, Comparator<T> comp)
      Sorts the specified range of elements according to the order induced by the specified comparator using Selection Sort,
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      comp - the Comparator that decides the sorting order
      Gibt zurück:
      input array
    • selectionSort

      public static <T> void selectionSort(T[] array, int length, Comparator<T> comp)
      Sorts the specified range of elements according to the order induced by the specified comparator using Selection Sort,
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      length - the maxmium size of the array to be sorted
      comp - the Comparator that decides the sorting order
    • selectionSort

      public static <T> void selectionSort(T[] array, int from, int to, Comparator<T> comp)
      Sorts the specified range of elements according to the order induced by the specified comparator using Selection Sort,
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      from - where the array should be sorted from
      to - where the array should be sorted to
      comp - the Comparator that decides the sorting order
    • selectionSort

      public static <T> T[] selectionSort(T[] array)
      Sorts an array according to the natural ascending order using Selection Sort,
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      Gibt zurück:
      input array
    • selectionSort

      public static <T> void selectionSort(T[] array, int length)
      Sorts an array according to the natural ascending order using Selection Sort,
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      length - the maxmium size of the array to be sorted
    • selectionSort

      public static <T> void selectionSort(T[] array, int from, int to)
      Sorts an array according to the natural ascending order using Selection Sort,
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      from - where the array should be sorted from
      to - where the array should be sorted to
    • mergeSort

      public static <T> T[] mergeSort(T[] array, Comparator<T> 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
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      comp - the Comparator that decides the sorting order
      Gibt zurück:
      input array
    • mergeSort

      public static <T> void mergeSort(T[] array, int length, Comparator<T> 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
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      length - the maxmium size of the array to be sorted
      comp - the Comparator that decides the sorting order
    • mergeSort

      public static <T> void mergeSort(T[] array, T[] supp, int from, int to, Comparator<T> 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
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      supp - the auxillary array that is used to simplify the sorting
      from - where the array should be sorted from
      to - where the array should be sorted to
      comp - the Comparator that decides the sorting order
    • mergeSort

      public static <T> T[] mergeSort(T[] array)
      Sorts an array according to the natural ascending order using Merge Sort, This implementation was copied from FastUtil with a couple custom optimizations
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      Gibt zurück:
      input array
    • mergeSort

      public static <T> void mergeSort(T[] 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
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      length - the maxmium size of the array to be sorted
    • mergeSort

      public static <T> void mergeSort(T[] array, T[] 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
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      supp - the auxillary array that is used to simplify the sorting
      from - where the array should be sorted from
      to - where the array should be sorted to
    • parallelMergeSort

      public static <T> void parallelMergeSort(T[] array, Comparator<T> 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
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      comp - 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 <T> void parallelMergeSort(T[] array, int length, Comparator<T> 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
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      length - the maxmium size of the array to be sorted
      comp - 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 <T> void parallelMergeSort(T[] array, T[] supp, int from, int to, Comparator<T> 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
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      supp - the auxillary array that is used to simplify the sorting
      from - where the array should be sorted from
      to - where the array should be sorted to
      comp - 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 <T> void parallelMergeSort(T[] 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
      Typparameter:
      T - the keyType of array that the operation should be applied
      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 <T> void parallelMergeSort(T[] 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
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      length - 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 <T> void parallelMergeSort(T[] array, T[] 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
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      supp - the auxillary array that is used to simplify the sorting
      from - where the array should be sorted from
      to - 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

      public static <T> void memFreeMergeSort(T[] array, Comparator<T> 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. It is in Very Unsorted Instances 50% slower then Mergesort, otherwise it as fast.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      comp - the Comparator that decides the sorting order
    • memFreeMergeSort

      public static <T> void memFreeMergeSort(T[] array, int length, Comparator<T> 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. It is in Very Unsorted Instances 50% slower then Mergesort, otherwise it as fast.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      length - the maxmium size of the array to be sorted
      comp - the Comparator that decides the sorting order
    • memFreeMergeSort

      public static <T> void memFreeMergeSort(T[] array, int from, int to, Comparator<T> 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. It is in Very Unsorted Instances 50% slower then Mergesort, otherwise it as fast.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      from - where the array should be sorted from
      to - where the array should be sorted to
      comp - the Comparator that decides the sorting order
    • memFreeMergeSort

      public static <T> T[] memFreeMergeSort(T[] 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.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      Gibt zurück:
      input array
    • memFreeMergeSort

      public static <T> void memFreeMergeSort(T[] 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.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      length - the maxmium size of the array to be sorted
    • memFreeMergeSort

      public static <T> void memFreeMergeSort(T[] 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.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      from - where the array should be sorted from
      to - where the array should be sorted to
    • parallelMemFreeMergeSort

      public static <T> void parallelMemFreeMergeSort(T[] array, Comparator<T> 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.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      comp - 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 <T> void parallelMemFreeMergeSort(T[] array, int length, Comparator<T> 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.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      length - the maxmium size of the array to be sorted
      comp - 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 <T> void parallelMemFreeMergeSort(T[] array, int from, int to, Comparator<T> 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.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      from - where the array should be sorted from
      to - where the array should be sorted to
      comp - 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 <T> void parallelMemFreeMergeSort(T[] 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.
      Typparameter:
      T - the keyType of array that the operation should be applied
      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 <T> void parallelMemFreeMergeSort(T[] 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.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      length - 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 <T> void parallelMemFreeMergeSort(T[] 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.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      from - where the array should be sorted from
      to - 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

      public static <T> T[] quickSort(T[] array, Comparator<T> 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. Bentley and M. DouglasMcIlroy, "Engineering a Sort Function", Software: Practice and Experience, 23(11), pages1249−1265, 1993.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      comp - the Comparator that decides the sorting order
      Gibt zurück:
      input array
    • quickSort

      public static <T> void quickSort(T[] array, int length, Comparator<T> 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. Bentley and M. DouglasMcIlroy, "Engineering a Sort Function", Software: Practice and Experience, 23(11), pages1249−1265, 1993.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      length - the maxmium size of the array to be sorted
      comp - the Comparator that decides the sorting order
    • quickSort

      public static <T> void quickSort(T[] array, int from, int to, Comparator<T> 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. Bentley and M. DouglasMcIlroy, "Engineering a Sort Function", Software: Practice and Experience, 23(11), pages1249−1265, 1993.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      from - where the array should be sorted from
      to - where the array should be sorted to
      comp - the Comparator that decides the sorting order
    • quickSort

      public static <T> T[] quickSort(T[] 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.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      Gibt zurück:
      input array
    • quickSort

      public static <T> void quickSort(T[] 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.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      length - the maxmium size of the array to be sorted
    • quickSort

      public static <T> void quickSort(T[] 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.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      from - where the array should be sorted from
      to - where the array should be sorted to
    • parallelQuickSort

      public static <T> void parallelQuickSort(T[] array, Comparator<T> 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. Bentley and M. DouglasMcIlroy, "Engineering a Sort Function", Software: Practice and Experience, 23(11), pages1249−1265, 1993.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      comp - 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 <T> void parallelQuickSort(T[] array, int length, Comparator<T> 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. Bentley and M. DouglasMcIlroy, "Engineering a Sort Function", Software: Practice and Experience, 23(11), pages1249−1265, 1993.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      length - the maxmium size of the array to be sorted
      comp - 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 <T> void parallelQuickSort(T[] array, int from, int to, Comparator<T> 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. Bentley and M. DouglasMcIlroy, "Engineering a Sort Function", Software: Practice and Experience, 23(11), pages1249−1265, 1993.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      from - where the array should be sorted from
      to - where the array should be sorted to
      comp - 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 <T> void parallelQuickSort(T[] 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.
      Typparameter:
      T - the keyType of array that the operation should be applied
      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 <T> void parallelQuickSort(T[] 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.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      length - 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 <T> void parallelQuickSort(T[] 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.
      Typparameter:
      T - the keyType of array that the operation should be applied
      Parameter:
      array - the array that needs to be sorted
      from - where the array should be sorted from
      to - 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