pub fn schwefel<G: Float>(x: &Vec<G>) -> f64Expand description
The Schwefel function
§Parameters
Any x lies in [-500.0; 500.0]. For any x lies in [-500.0; 500.0] global minimum located in x’ = (420.9687, 420.9687, …). f(x’) = 0.
use ew_testfunc::schwefel;
let x = vec![420.9687, 420.9687, 420.9687, 420.9687];
let value = schwefel(&x);
assert!(value.abs() < 1e-4);