Interface ComparatorVariable<T extends Var>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int compare​(float metric, T var)
      It compares the baseline metric to the variable metric.
      int compare​(T leftVar, T rightVar)
      It compares the metric of the left variable against the right one.
      float metric​(T var)
      It returns the metric of the variable given according to the comparator.
    • Method Detail

      • compare

        int compare​(float metric,
                    T var)
        It compares the baseline metric to the variable metric.
        Parameters:
        metric - the baseline for comparison.
        var - variable which is compared to baseline.
        Returns:
        1 if metric is larger than variable, 0 if equal, -1 if baseline is smaller.
      • compare

        int compare​(T leftVar,
                    T rightVar)
        It compares the metric of the left variable against the right one.
        Parameters:
        leftVar - left variable
        rightVar - right variable
        Returns:
        1 if metric for left variable is greater, 0 is they are equal, -1 if smaller.
      • metric

        float metric​(T var)
        It returns the metric of the variable given according to the comparator.
        Parameters:
        var - variable for which metric is computed.
        Returns:
        the metric of the variable according to the comparator.