![]() |
Stan Math Library
5.3.0
Automatic Differentiation
|
|
inline |
Compute the integral of the single variable function f from a to b using adaptive double-exponential quadrature.
a and b can be finite or infinite.
The signature for f should be: double f(double x, double xc, const std::vector<double>& theta, const std::vector<double>& x_r, const std::vector<int>& x_i, std::ostream* msgs)
It should return the value of the function evaluated at x. Any errors should be printed to the msgs stream.
The integration algorithm terminates per piece when error <= max(relative_tolerance * L1, absolute_tolerance) where L1 is the Boost estimate of the L1 norm of the integral.
| F | type of function to integrate |
| Args | types of additional arguments forwarded to f (all arithmetic) |
| f | the function to be integrated | |
| a | lower limit of integration | |
| b | upper limit of integration | |
| relative_tolerance | relative tolerance passed to Boost quadrature | |
| absolute_tolerance | absolute-error floor on the convergence test | |
| max_refinements | maximum refinement level passed to the Boost quadrature class constructor | |
| [in,out] | msgs | the print stream for warning messages |
| args | additional arguments passed to f |
Definition at line 268 of file integrate_1d_double_exponential.hpp.