Expose one dimensional integrator function from the math library to the language.
/**
* Return definite integral of specified function between lower bound and upper
* bound, with specified absolute and relative tolerances.
* @param f one-dimensional function to integrate
* @param lb lower bound of integration
* @param ub upper bound of integration
* @param theta vector of parameters
* @param atol absolute tolerance of solution
* @param rtol relative tolerance of solution
* @return integral of f between lb and ub
* @throw if lb, ub, atol, rtol are not finite or if atol and rtol are not positive or if lb > ub
*/
real integrate_definite(fun(real -> real) f, real lb, real ub, vector theta, real atol, real rtol);
Summary:
Expose one dimensional integrator function from the math library to the language.
The function
f
must have the signatureand what gets returned is
See: https://github.com/stan-dev/math/pull/566
Description
This will require a special expression as it takes a function as input.
Current Version:
v2.17.1