Rastrigin¶

- class gob.benchmarks.rastrigin.Rastrigin¶
Bases:
Benchmark
The Rastrigin function.
\(f(x) = \sum_{i=1}^d [x_i ^2 + 10 - 10\cos(2\pi x_i)]\)
Its minimum is \(0\) achieved at \(x = 0\).
- expr(x)¶
The expression of the function.
- Parameters:
x (array-like) – The point at which to evaluate the function.
- Returns:
The value of the function at x.
- Return type:
float