Macro peroxide::single_derivative

source ·
macro_rules! single_derivative {
    ($problem:expr, $x:expr) => { ... };
}
Expand description

Macro for single derivative

§Description

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);