[][src]Function argmin::testfunctions::ackley

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

Ackley test function

Defined as

f(x_1, x_2, ..., x_n) = - a * exp( -b \sqrt{\frac{1}{d}\sum_{i=1}^n x_i^2 ) - exp( \frac{1}{d} cos(c * x_i) ) + a + exp(1)

where x_i \in [-32.768, 32.768] and usually a = 10, b = 0.2 and c = 2*pi

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