pub fn schaffer_n4<T>(param: &[T; 2]) -> Twhere
T: Float + FromPrimitive,
Expand description
Schaffer test function No. 4
Defined as
$$ f(x_1,\,x_2) = 0.5 + \frac{\cos^2(\sin(\left|x_1^2 - x_2^2\right|)) - 0.5}{\left[1 + 0.001(x_1^2 + x_2^2)\right]^2} $$
where $x_i \in [-100, 100]$.
The global minimum is at $f(x_1,\,x_2) = f(0,\,1.25313) = 0.291992$.