Class RadixSort

java.lang.Object
org.jgrapht.util.RadixSort

public class RadixSort extends Object
Sorts the specified list of integers into ascending order using the Radix Sort method. This algorithms runs in $O(N + V)$ time and uses $O(N + V)$ extra memory, where $V = 256$. If $N \leq RadixSort.CUT\_OFF$ then the standard Java sorting algorithm is used. The specified list must be modifiable, but need not be resizable.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static int[]
     
    static int
    Deprecated, for removal: This API element is subject to removal in a future version.
    use setCutOff(int) instead
    private static final int
     
    private static final int
     
    private static final int
     
    private static final int
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private static void
    radixSort(int[] array, int n, int[] tempArray, int[] cnt)
     
    static void
    setCutOff(int cutOff)
     
    static void
    sort(List<Integer> list)
    Sort the given list in ascending order.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • RadixSort

      private RadixSort()
  • Method Details

    • setCutOff

      public static void setCutOff(int cutOff)
    • radixSort

      private static void radixSort(int[] array, int n, int[] tempArray, int[] cnt)
    • sort

      public static void sort(List<Integer> list)
      Sort the given list in ascending order.
      Parameters:
      list - the input list of integers