Class NeighbourhoodSizeFunctionFactory

    • Method Detail

      • exponentialDecay

        public static NeighbourhoodSizeFunction exponentialDecay​(double initValue,
                                                                 double valueAtNumCall,
                                                                 long numCall)
        Creates an exponential decay function. It will compute a e-x / b, where x is the (integer) independent variable and
        • a = initValue
        • b = -numCall / ln(valueAtNumCall / initValue)
        Parameters:
        initValue - Initial value, i.e. value(0).
        valueAtNumCall - Value of the function at numCall.
        numCall - Argument for which the function returns valueAtNumCall.
        Returns:
        the neighbourhood size function.
        Throws:
        IllegalArgumentException - if initValue <= 0, valueAtNumCall <= 0, valueAtNumCall >= initValue or numCall <= 0.
      • quasiSigmoidDecay

        public static NeighbourhoodSizeFunction quasiSigmoidDecay​(double initValue,
                                                                  double slope,
                                                                  long numCall)
        Creates an sigmoid-like NeighbourhoodSizeFunction function. The function f will have the following properties:
        • f(0) = initValue
        • numCall is the inflexion point
        • slope = f'(numCall)
        Parameters:
        initValue - Initial value, i.e. value(0).
        slope - Value of the function derivative at numCall.
        numCall - Inflexion point.
        Returns:
        the neighbourhood size function.
        Throws:
        IllegalArgumentException - if initValue <= 0, slope >= 0 or numCall <= 0.