pub type optimgr = unsafe extern "C-unwind" fn(n: c_int, par: *mut f64, gr: *mut f64, ex: *mut c_void);Expand description
Gradient callback type for R’s optimisers: optimgr in R_ext/Applic.h,
typedef void optimgr(int n, double *par, double *gr, void *ex).
Called with the parameter count, a pointer to n parameter values, a
pointer to n gradient slots to fill, and the ex pointer given to the
optimiser. The panic rule of optimfn applies: catch it inside, store
the payload in ex, fill the slots (zeros will do), resume afterwards.
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes