(self, x)
return sum(s**0.25 * (np.sin(50*s**0.1)**2 + 1))
Schaffer function x0 in [-100..100]
Schaffer function x0 in [-100..100]
Schaffer function x0 in [ - 100 .. 100 ]
def schaffer(self, x):
        """ Schaffer function x0 in [-100..100]"""
        N = len(x);
        s = x[0:N-1]**2 + x[1:N]**2;
        return sum(s**0.25 * (np.sin(50*s**0.1)**2 + 1))
def schaffer ( self , x ) : N = len ( x ) s = x [ 0 : N - 1 ] ** 2 + x [ 1 : N ] ** 2 return sum ( s ** 0.25 * ( np . sin ( 50 * s ** 0.1 ) ** 2 + 1 ) )