Rosenbrock

../../_images/Rosenbrock.png
class gob.benchmarks.rosenbrock.Rosenbrock

Bases: Benchmark

The Rosenbrock function.

\(f(x) = \sum_{i=1}^{d-1} \left[100(x_{i+1} - x_i^2)^2 + (x_i - 1)^2 \right]\)

Its minimum is \(0\) achieved at \(x_i = 1\).

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