Skip to content

Commit ed790f9

Browse files
Update Shubert
Update shubert as the number of each iteration is multiplied by cos function and one element of input array is multiplied by cos function as defined by the definition. Thank you! With kind regards.
1 parent 719c9b6 commit ed790f9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pybenchfunction/function.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2348,7 +2348,8 @@ def get_global_minimum(self, d):
23482348

23492349
def __call__(self, X):
23502350
d = X.shape[0]
2351-
res = np.prod(np.sum([np.cos((j+1)*X + j) for j in range(1, 5+1)]))
2351+
for i in range(0,d):
2352+
res = np.prod(np.sum([i * np.cos((j+1)*X[i] + j) for j in range(1, 5+1)]))
23522353
return res
23532354

23542355
class ShubertN3:

0 commit comments

Comments
 (0)