Class Sort

java.lang.Object
io.deephaven.function.Sort

public class Sort extends Object
Functions for sorting primitive types.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int[]
    rank(byte... values)
    Returns the indices of values sorted from smallest to largest.
    static int[]
    rank(double... values)
    Returns the indices of values sorted from smallest to largest.
    static int[]
    rank(float... values)
    Returns the indices of values sorted from smallest to largest.
    static int[]
    rank(int... values)
    Returns the indices of values sorted from smallest to largest.
    static int[]
    rank(long... values)
    Returns the indices of values sorted from smallest to largest.
    static int[]
    rank(short... values)
    Returns the indices of values sorted from smallest to largest.
    static int[]
    rank(ByteVector values)
    Returns the indices of values sorted from smallest to largest.
    static int[]
    Returns the indices of values sorted from smallest to largest.
    static int[]
    rank(FloatVector values)
    Returns the indices of values sorted from smallest to largest.
    static int[]
    rank(IntVector values)
    Returns the indices of values sorted from smallest to largest.
    static int[]
    rank(LongVector values)
    Returns the indices of values sorted from smallest to largest.
    static int[]
    rank(ShortVector values)
    Returns the indices of values sorted from smallest to largest.
    static int[]
    rank(Byte[] values)
    Returns the indices of values sorted from smallest to largest.
    static int[]
    rank(Double[] values)
    Returns the indices of values sorted from smallest to largest.
    static int[]
    rank(Float[] values)
    Returns the indices of values sorted from smallest to largest.
    static int[]
    rank(Integer[] values)
    Returns the indices of values sorted from smallest to largest.
    static int[]
    rank(Long[] values)
    Returns the indices of values sorted from smallest to largest.
    static int[]
    rank(Short[] values)
    Returns the indices of values sorted from smallest to largest.
    static int[]
    rankDescending(byte... values)
    Returns the indices of values sorted from largest to smallest.
    static int[]
    rankDescending(double... values)
    Returns the indices of values sorted from largest to smallest.
    static int[]
    rankDescending(float... values)
    Returns the indices of values sorted from largest to smallest.
    static int[]
    rankDescending(int... values)
    Returns the indices of values sorted from largest to smallest.
    static int[]
    rankDescending(long... values)
    Returns the indices of values sorted from largest to smallest.
    static int[]
    rankDescending(short... values)
    Returns the indices of values sorted from largest to smallest.
    static int[]
    Returns the indices of values sorted from largest to smallest.
    static int[]
    Returns the indices of values sorted from largest to smallest.
    static int[]
    Returns the indices of values sorted from largest to smallest.
    static int[]
    Returns the indices of values sorted from largest to smallest.
    static int[]
    Returns the indices of values sorted from largest to smallest.
    static int[]
    Returns the indices of values sorted from largest to smallest.
    static int[]
    rankDescending(Byte[] values)
    Returns the indices of values sorted from largest to smallest.
    static int[]
    Returns the indices of values sorted from largest to smallest.
    static int[]
    Returns the indices of values sorted from largest to smallest.
    static int[]
    Returns the indices of values sorted from largest to smallest.
    static int[]
    rankDescending(Long[] values)
    Returns the indices of values sorted from largest to smallest.
    static int[]
    Returns the indices of values sorted from largest to smallest.
    static <T extends Comparable<? super T>>
    int[]
    Returns the indices of values sorted from largest to smallest.
    static <T extends Comparable<? super T>>
    int[]
    rankDescendingObj(ObjectVector<T> values, Comparator<T> comparator)
    Returns the indices of values sorted from largest to smallest.
    static <T extends Comparable<? super T>>
    int[]
    rankDescendingObj(T... values)
    Returns the indices of values sorted from largest to smallest.
    static <T extends Comparable<? super T>>
    int[]
    rankDescendingObj(T[] values, Comparator<T> comparator)
    Returns the indices of values sorted from largest to smallest.
    static <T extends Comparable<? super T>>
    int[]
    rankObj(ObjectVector<T> values)
    Returns the indices of values sorted from smallest to largest.
    static <T extends Comparable<? super T>>
    int[]
    rankObj(ObjectVector<T> values, Comparator<T> comparator)
    Returns the indices of values sorted from smallest to largest.
    static <T extends Comparable<? super T>>
    int[]
    rankObj(T... values)
    Returns the indices of values sorted from smallest to largest.
    static <T extends Comparable<? super T>>
    int[]
    rankObj(T[] values, Comparator<T> comparator)
    Returns the indices of values sorted from smallest to largest.
    static byte[]
    sort(byte... values)
    Returns sorted values from smallest to largest.
    static double[]
    sort(double... values)
    Returns sorted values from smallest to largest.
    static float[]
    sort(float... values)
    Returns sorted values from smallest to largest.
    static int[]
    sort(int... values)
    Returns sorted values from smallest to largest.
    static long[]
    sort(long... values)
    Returns sorted values from smallest to largest.
    static short[]
    sort(short... values)
    Returns sorted values from smallest to largest.
    static byte[]
    sort(ByteVector values)
    Returns sorted values from smallest to largest.
    static double[]
    Returns sorted values from smallest to largest.
    static float[]
    sort(FloatVector values)
    Returns sorted values from smallest to largest.
    static int[]
    sort(IntVector values)
    Returns sorted values from smallest to largest.
    static long[]
    sort(LongVector values)
    Returns sorted values from smallest to largest.
    static short[]
    sort(ShortVector values)
    Returns sorted values from smallest to largest.
    static byte[]
    sort(Byte[] values)
    Returns sorted values from smallest to largest.
    static double[]
    sort(Double[] values)
    Returns sorted values from smallest to largest.
    static float[]
    sort(Float[] values)
    Returns sorted values from smallest to largest.
    static int[]
    sort(Integer[] values)
    Returns sorted values from smallest to largest.
    static long[]
    sort(Long[] values)
    Returns sorted values from smallest to largest.
    static short[]
    sort(Short[] values)
    Returns sorted values from smallest to largest.
    static byte[]
    sortDescending(byte... values)
    Returns sorted values from largest to smallest.
    static double[]
    sortDescending(double... values)
    Returns sorted values from largest to smallest.
    static float[]
    sortDescending(float... values)
    Returns sorted values from largest to smallest.
    static int[]
    sortDescending(int... values)
    Returns sorted values from largest to smallest.
    static long[]
    sortDescending(long... values)
    Returns sorted values from largest to smallest.
    static short[]
    sortDescending(short... values)
    Returns sorted values from largest to smallest.
    static byte[]
    Returns sorted values from largest to smallest.
    static double[]
    Returns sorted values from largest to smallest.
    static float[]
    Returns sorted values from largest to smallest.
    static int[]
    Returns sorted values from largest to smallest.
    static long[]
    Returns sorted values from largest to smallest.
    static short[]
    Returns sorted values from largest to smallest.
    static byte[]
    sortDescending(Byte[] values)
    Returns sorted values from largest to smallest.
    static double[]
    Returns sorted values from largest to smallest.
    static float[]
    Returns sorted values from largest to smallest.
    static int[]
    Returns sorted values from largest to smallest.
    static long[]
    sortDescending(Long[] values)
    Returns sorted values from largest to smallest.
    static short[]
    Returns sorted values from largest to smallest.
    static <T extends Comparable<? super T>>
    T[]
    Returns sorted values from largest to smallest.
    static <T extends Comparable<? super T>>
    T[]
    sortDescendingObj(ObjectVector<T> values, Comparator<T> comparator)
    Returns sorted values from largest to smallest.
    static <T extends Comparable<? super T>>
    T[]
    sortDescendingObj(T... values)
    Returns sorted values from largest to smallest.
    static <T extends Comparable<? super T>>
    T[]
    sortDescendingObj(T[] values, Comparator<T> comparator)
    Returns sorted values from largest to smallest.
    static <T extends Comparable<? super T>>
    T[]
    sortObj(ObjectVector<T> values)
    Returns sorted values from smallest to largest.
    static <T extends Comparable<? super T>>
    T[]
    sortObj(ObjectVector<T> values, Comparator<T> comparator)
    Returns sorted values from smallest to largest.
    static <T extends Comparable<? super T>>
    T[]
    sortObj(T... values)
    Returns sorted values from smallest to largest.
    static <T extends Comparable<? super T>>
    T[]
    sortObj(T[] values, Comparator<T> comparator)
    Returns sorted values from smallest to largest.

    Methods inherited from class java.lang.Object

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

    • Sort

      public Sort()
  • Method Details

    • sortObj

      public static <T extends Comparable<? super T>> T[] sortObj(ObjectVector<T> values, Comparator<T> comparator)
      Returns sorted values from smallest to largest.
      Parameters:
      values - values.
      comparator - value comparator.
      Returns:
      sorted values.
    • sortObj

      public static <T extends Comparable<? super T>> T[] sortObj(ObjectVector<T> values)
      Returns sorted values from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sortObj

      public static <T extends Comparable<? super T>> T[] sortObj(T[] values, Comparator<T> comparator)
      Returns sorted values from smallest to largest.
      Parameters:
      values - values.
      comparator - value comparator.
      Returns:
      sorted values.
    • sortObj

      @SafeVarargs public static <T extends Comparable<? super T>> T[] sortObj(T... values)
      Returns sorted values from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • rankObj

      public static <T extends Comparable<? super T>> int[] rankObj(ObjectVector<T> values, Comparator<T> comparator)
      Returns the indices of values sorted from smallest to largest.
      Parameters:
      values - values.
      comparator - value comparator.
      Returns:
      sorted indices.
    • rankObj

      public static <T extends Comparable<? super T>> int[] rankObj(ObjectVector<T> values)
      Returns the indices of values sorted from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rankObj

      public static <T extends Comparable<? super T>> int[] rankObj(T[] values, Comparator<T> comparator)
      Returns the indices of values sorted from smallest to largest.
      Parameters:
      values - values.
      comparator - value comparator.
      Returns:
      sorted indices.
    • rankObj

      @SafeVarargs public static <T extends Comparable<? super T>> int[] rankObj(T... values)
      Returns the indices of values sorted from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • sortDescendingObj

      public static <T extends Comparable<? super T>> T[] sortDescendingObj(ObjectVector<T> values, Comparator<T> comparator)
      Returns sorted values from largest to smallest.
      Parameters:
      values - values.
      comparator - value comparator.
      Returns:
      sorted values.
    • sortDescendingObj

      public static <T extends Comparable<? super T>> T[] sortDescendingObj(ObjectVector<T> values)
      Returns sorted values from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sortDescendingObj

      public static <T extends Comparable<? super T>> T[] sortDescendingObj(T[] values, Comparator<T> comparator)
      Returns sorted values from largest to smallest.
      Parameters:
      values - values.
      comparator - value comparator.
      Returns:
      sorted values.
    • sortDescendingObj

      @SafeVarargs public static <T extends Comparable<? super T>> T[] sortDescendingObj(T... values)
      Returns sorted values from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • rankDescendingObj

      public static <T extends Comparable<? super T>> int[] rankDescendingObj(ObjectVector<T> values, Comparator<T> comparator)
      Returns the indices of values sorted from largest to smallest.
      Parameters:
      values - values.
      comparator - value comparator.
      Returns:
      sorted indices.
    • rankDescendingObj

      public static <T extends Comparable<? super T>> int[] rankDescendingObj(ObjectVector<T> values)
      Returns the indices of values sorted from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rankDescendingObj

      public static <T extends Comparable<? super T>> int[] rankDescendingObj(T[] values, Comparator<T> comparator)
      Returns the indices of values sorted from largest to smallest.
      Parameters:
      values - values.
      comparator - value comparator.
      Returns:
      sorted indices.
    • rankDescendingObj

      @SafeVarargs public static <T extends Comparable<? super T>> int[] rankDescendingObj(T... values)
      Returns the indices of values sorted from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • sort

      public static byte[] sort(ByteVector values)
      Returns sorted values from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sort

      public static byte[] sort(byte... values)
      Returns sorted values from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sort

      public static byte[] sort(Byte[] values)
      Returns sorted values from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • rank

      public static int[] rank(ByteVector values)
      Returns the indices of values sorted from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rank

      public static int[] rank(byte... values)
      Returns the indices of values sorted from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rank

      public static int[] rank(Byte[] values)
      Returns the indices of values sorted from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • sortDescending

      public static byte[] sortDescending(ByteVector values)
      Returns sorted values from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sortDescending

      public static byte[] sortDescending(byte... values)
      Returns sorted values from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sortDescending

      public static byte[] sortDescending(Byte[] values)
      Returns sorted values from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • rankDescending

      public static int[] rankDescending(ByteVector values)
      Returns the indices of values sorted from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rankDescending

      public static int[] rankDescending(byte... values)
      Returns the indices of values sorted from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rankDescending

      public static int[] rankDescending(Byte[] values)
      Returns the indices of values sorted from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • sort

      public static short[] sort(ShortVector values)
      Returns sorted values from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sort

      public static short[] sort(short... values)
      Returns sorted values from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sort

      public static short[] sort(Short[] values)
      Returns sorted values from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • rank

      public static int[] rank(ShortVector values)
      Returns the indices of values sorted from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rank

      public static int[] rank(short... values)
      Returns the indices of values sorted from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rank

      public static int[] rank(Short[] values)
      Returns the indices of values sorted from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • sortDescending

      public static short[] sortDescending(ShortVector values)
      Returns sorted values from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sortDescending

      public static short[] sortDescending(short... values)
      Returns sorted values from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sortDescending

      public static short[] sortDescending(Short[] values)
      Returns sorted values from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • rankDescending

      public static int[] rankDescending(ShortVector values)
      Returns the indices of values sorted from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rankDescending

      public static int[] rankDescending(short... values)
      Returns the indices of values sorted from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rankDescending

      public static int[] rankDescending(Short[] values)
      Returns the indices of values sorted from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • sort

      public static int[] sort(IntVector values)
      Returns sorted values from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sort

      public static int[] sort(int... values)
      Returns sorted values from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sort

      public static int[] sort(Integer[] values)
      Returns sorted values from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • rank

      public static int[] rank(IntVector values)
      Returns the indices of values sorted from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rank

      public static int[] rank(int... values)
      Returns the indices of values sorted from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rank

      public static int[] rank(Integer[] values)
      Returns the indices of values sorted from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • sortDescending

      public static int[] sortDescending(IntVector values)
      Returns sorted values from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sortDescending

      public static int[] sortDescending(int... values)
      Returns sorted values from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sortDescending

      public static int[] sortDescending(Integer[] values)
      Returns sorted values from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • rankDescending

      public static int[] rankDescending(IntVector values)
      Returns the indices of values sorted from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rankDescending

      public static int[] rankDescending(int... values)
      Returns the indices of values sorted from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rankDescending

      public static int[] rankDescending(Integer[] values)
      Returns the indices of values sorted from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • sort

      public static long[] sort(LongVector values)
      Returns sorted values from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sort

      public static long[] sort(long... values)
      Returns sorted values from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sort

      public static long[] sort(Long[] values)
      Returns sorted values from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • rank

      public static int[] rank(LongVector values)
      Returns the indices of values sorted from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rank

      public static int[] rank(long... values)
      Returns the indices of values sorted from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rank

      public static int[] rank(Long[] values)
      Returns the indices of values sorted from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • sortDescending

      public static long[] sortDescending(LongVector values)
      Returns sorted values from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sortDescending

      public static long[] sortDescending(long... values)
      Returns sorted values from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sortDescending

      public static long[] sortDescending(Long[] values)
      Returns sorted values from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • rankDescending

      public static int[] rankDescending(LongVector values)
      Returns the indices of values sorted from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rankDescending

      public static int[] rankDescending(long... values)
      Returns the indices of values sorted from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rankDescending

      public static int[] rankDescending(Long[] values)
      Returns the indices of values sorted from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • sort

      public static float[] sort(FloatVector values)
      Returns sorted values from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sort

      public static float[] sort(float... values)
      Returns sorted values from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sort

      public static float[] sort(Float[] values)
      Returns sorted values from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • rank

      public static int[] rank(FloatVector values)
      Returns the indices of values sorted from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rank

      public static int[] rank(float... values)
      Returns the indices of values sorted from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rank

      public static int[] rank(Float[] values)
      Returns the indices of values sorted from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • sortDescending

      public static float[] sortDescending(FloatVector values)
      Returns sorted values from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sortDescending

      public static float[] sortDescending(float... values)
      Returns sorted values from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sortDescending

      public static float[] sortDescending(Float[] values)
      Returns sorted values from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • rankDescending

      public static int[] rankDescending(FloatVector values)
      Returns the indices of values sorted from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rankDescending

      public static int[] rankDescending(float... values)
      Returns the indices of values sorted from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rankDescending

      public static int[] rankDescending(Float[] values)
      Returns the indices of values sorted from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • sort

      public static double[] sort(DoubleVector values)
      Returns sorted values from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sort

      public static double[] sort(double... values)
      Returns sorted values from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sort

      public static double[] sort(Double[] values)
      Returns sorted values from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • rank

      public static int[] rank(DoubleVector values)
      Returns the indices of values sorted from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rank

      public static int[] rank(double... values)
      Returns the indices of values sorted from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rank

      public static int[] rank(Double[] values)
      Returns the indices of values sorted from smallest to largest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • sortDescending

      public static double[] sortDescending(DoubleVector values)
      Returns sorted values from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sortDescending

      public static double[] sortDescending(double... values)
      Returns sorted values from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • sortDescending

      public static double[] sortDescending(Double[] values)
      Returns sorted values from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted values.
    • rankDescending

      public static int[] rankDescending(DoubleVector values)
      Returns the indices of values sorted from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rankDescending

      public static int[] rankDescending(double... values)
      Returns the indices of values sorted from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted indices.
    • rankDescending

      public static int[] rankDescending(Double[] values)
      Returns the indices of values sorted from largest to smallest.
      Parameters:
      values - values.
      Returns:
      sorted indices.