def function(self):
    'Return benchmark evaluation function.\n\n\t\tReturns:\n\t\t\tCallable[[int, Union[int, float, List[int, float], numpy.ndarray]], float]: Fitness function\n\t\t'

    def f(D, X):
        'Fitness function.\n\n\t\t\tArgs:\n\t\t\t\tD (int): Dimensionality of the problem\n\t\t\t\tsol (Union[int, float, List[int, float], numpy.ndarray]): Solution to check.\n\n\t\t\tReturns:\n\t\t\t\tfloat: Fitness value for the solution.\n\t\t\t'
        (v1, v2) = (0.0, 0.0)
        for i in range(D):
            (v1, v2) = ((v1 + cos(((5 * pi) * X[i]))), (v2 + (X[i] ** 2)))
        return (((- 0.1) * v1) - v2)
    return f
Return benchmark evaluation function.

Returns:
        Callable[[int, Union[int, float, List[int, float], numpy.ndarray]], float]: Fitness function
def function(self):
    'Return benchmark evaluation function.\n\n\t\tReturns:\n\t\t\tCallable[[int, Union[int, float, List[int, float], numpy.ndarray]], float]: Fitness function\n\t\t'

    def f(D, X):
        'Fitness function.\n\n\t\t\tArgs:\n\t\t\t\tD (int): Dimensionality of the problem\n\t\t\t\tsol (Union[int, float, List[int, float], numpy.ndarray]): Solution to check.\n\n\t\t\tReturns:\n\t\t\t\tfloat: Fitness value for the solution.\n\t\t\t'
        (v1, v2) = (0.0, 0.0)
        for i in range(D):
            (v1, v2) = ((v1 + cos(((5 * pi) * X[i]))), (v2 + (X[i] ** 2)))
        return (((- 0.1) * v1) - v2)
    return f