Interface WeightingFunction

  • All Superinterfaces:

    public interface WeightingFunction
    extends Named
    A function to allow a smooth weighing between two functions.

    If two functions f(x) and g(x) fit the data set (x_i,y_i) at the points x_a and x_b (i.e. f(x_a) = g(x_a) = y_a and f(x_b) = g(x_b) = y_b), then a weighted function h(x) = w(x)f(x) + (1-w(x))*g(x) with 0 <= w(x) <= 1 will also fit the points a and b

    • Method Detail

      • getWeight

        default double getWeight​(double[] xs,
                                 int index,
                                 double x)
        Gets the function weight for point x, based on the lower bound index.
        xs - the independent data points
        index - the index of the data point below x
        x - the x-point to find the weight for
        the weight
      • getWeight

        double getWeight​(double y)
        Gets the weight.

        The condition that must be satisfied by all weight functions is that w(1) = 1, w(0) = 0 and dw(y)/dy <= 0 - i.e. w(y) is monotonically decreasing.

        y - a value between 0 and 1
        the weight