[][src]Function argmin::testfunctions::rosenbrock_2d

pub fn rosenbrock_2d<T>(param: &[T], a: T, b: T) -> T where
    T: FromPrimitive + Float

2D Rosenbrock test function

Defined as

f(x_1, x_2) = (a - x_1)^2 + b * (x_2 - x_1^2)^2

where x_i \in (-\infty, \infty). The parameters a and b usually are: a = 1 and b = 100.

For 2D problems, this function is much faster than rosenbrock.

The global minimum is at f(x_1, x_2) = f(1, 1) = 0.