pub trait HasGrad<T> { // Required methods fn f(&self, x: T) -> T; fn d_f(&self, x: T) -> T; }
Differentiable function
Derivative of function