Class QuickSortComparator<T>

java.lang.Object
org.ddogleg.sorting.QuickSortComparator<T>

public class QuickSortComparator<T> extends Object
An implementation of the quick sort algorithm from Numerical Recipes Third Edition that is specified for arrays of floats. A small amount of memory is declared for this sorting algorithm. This implementation of QuickSort allows you to use a Comparator. Useful when you want to ensure that no extra memory is declared each time you sort. This is possible when using built in methods.
  • Constructor Details

    • QuickSortComparator

      public QuickSortComparator(Comparator<T> comparator)
    • QuickSortComparator

      public QuickSortComparator(int NSTACK, int M, Comparator<T> comparator)
  • Method Details

    • sort

      public void sort(T[] arr, int length)
    • sort

      public void sort(List<T> arr, int length)
    • sort

      public void sort(T[] arr, int length, int[] indexes)