pub type MultiGradientFn = dyn Fn(f64) -> Vec<f64> + 'static;
Dynamic trait object for multi-variable gradient functions