macro_rules! single_derivative { ($problem:expr, $x:expr) => { ... }; }
Macro for single derivative
For I=1, O=1, it is bother to write below code.
let fx = problem.derivative([x])?[0][0];
This macro solve this problem as follows.
let fx = single_derivative!(problem, x);