[][src]Function argmin::testfunctions::sphere

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

Sphere test function

Defined as

`f(x_1, x_2, ..., x_n) = \sum_{i=1}^n x_i^2

where x_i \in (-\infty, \infty) and n > 0.

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