[][src]Function argmin_testfunctions::schaffer_n2

pub fn schaffer_n2<T: Float + FromPrimitive>(param: &[T]) -> T

Schaffer test function No. 2

Defined as

f(x_1, x_2) = 0.5 + (sin^2(x_1^2 - x_2^2) - 0.5) / (1 + 0.001*(x_1^2 + x_2^2))^2

where x_i \in [-100, 100].

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