Celeritas
0.5.0-86+4a8eea4
|
Integrate a piecewise function. More...
#include <CdfUtils.hh>
Public Member Functions | |
SegmentIntegrator (I &&integrate) | |
Construct with integrator. | |
template<class T , std::size_t N, std::size_t M> | |
void | operator() (Span< T const, N > x, Span< T const, N > f, Span< T, M > dst, T init={}) |
Integrate a function. | |
Integrate a piecewise function.
To construct a CDF, init
should be zero, and the destination should be normalized by its final value afterward.