Interface RankingAlgorithm

  • All Superinterfaces:
    java.util.function.Function<double[],​double[]>, java.util.function.UnaryOperator<double[]>
    All Known Implementing Classes:
    NaturalRanking
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface RankingAlgorithm
    extends java.util.function.UnaryOperator<double[]>
    Interface representing a rank transformation.
    Since:
    1.1
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      double[] apply​(double[] data)
      Performs a rank transformation on the input data, returning an array of ranks.
      • Methods inherited from interface java.util.function.Function

        andThen, compose
    • Method Detail

      • apply

        double[] apply​(double[] data)

        Performs a rank transformation on the input data, returning an array of ranks.

        Ranks should be 1-based: the smallest value returned in an array of ranks should be greater than or equal to one, rather than 0. Ranks should in general take integer values, though implementations may return averages or other floating point values to resolve ties in the input data.

        Specified by:
        apply in interface java.util.function.Function<double[],​double[]>
        Parameters:
        data - Array of data to be ranked.
        Returns:
        an array of ranks corresponding to the elements of the input array