Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ integrate_1d_double_exponential() [2/2]

template<typename F , typename T_a , typename T_b , typename... Args, require_any_st_var< T_a, T_b, Args... > * = nullptr>
return_type_t< T_a, T_b, Args... > stan::math::integrate_1d_double_exponential ( const F &  f,
const T_a &  a,
const T_b &  b,
std::ostream *  msgs,
const Args &...  args 
)
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.

f should be compatible with reverse mode autodiff and have the signature: var f(double x, double xc, const std::vector<var>& theta, const std::vector<double>& x_r, const std::vector<int> &x_i, std::ostream* msgs)

Gradients of f that evaluate to NaN when the function evaluates to zero are set to zero themselves.

Template Parameters
FType of f
T_atype of first limit
T_btype of second limit
Argstypes of parameter pack arguments
Parameters
fthe functor to integrate
alower limit of integration
bupper limit of integration
relative_tolerancerelative tolerance passed to Boost quadrature
absolute_toleranceabsolute-error floor on the convergence test
max_refinementsmaximum refinement level passed to the Boost quadrature class constructor
[in,out]msgsthe print stream for warning messages
argsadditional arguments to pass to f
Returns
numeric integral of function f

Definition at line 89 of file integrate_1d_double_exponential.hpp.