paramFunctor

Takes a distribution function (CDF or PDF/PMF) as a template argument, and parameters as function arguments in the order that they appear in the function declaration and returns a functor that binds the supplied parameters to the distribution function. Assumes the non-parameter argument is the first argument to the distribution function.

ParamFunctor!(distrib)
paramFunctor
(
alias distrib
)
(
ParameterTypeTuple!(distrib)[1..$] parameters
)

Examples

auto stdNormal = paramFunctor!(normalCDF)(0.0L, 1.0L);

stdNormal is now a functor for the normal(0, 1) distribution.

Meta