Template Function utilities::cumulative_integrate¶
- Defined in File integration.h
Function Documentation¶
-
template <typename T_functor>
Eigen::ArrayXdutilities
::
cumulative_integrate
(const Eigen::ArrayXd &x, const T_functor &functor, const int max_subintervals = 200)¶ Cumulative numerical integration of a functor in 1D, using gauss-Kronrod61 integration.
Operates in the first dimension (colwise). Applied by reference or returns by value.
- Return
- The cumulative integration of f with respect to x, over the domain in input x
- Template Parameters
T_functor
: Type of the functor class instance supplied to the integrator
- Parameters
x
: The domain of x over which to do a cumulative integration. Output values of the cumulative integral are given at these x locations.functor
: The integrand functor. This functor must, given a scalar value of x, return a scalar of the same type containing the value of the integrand function at the input point.max_subintervals
: The maximum number of subintervals allowed in the subdivision process of quadrature functions, for each segment in x. This corresponds to the amount of memory allocated for said functions.