Function sphere_derivative

Source
pub fn sphere_derivative<T>(param: &[T]) -> Vec<T>
where T: Float + FromPrimitive,
Expand description

Derivative of sphere test function.

Defined as

$$ f(x_1,\,x_2,\,\ldots,\,x_d) = (2x_1,\,2x_2,\,\ldots,\,2x_d) $$

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