Report a bug
If you spot a problem with this page, click here to create a GitHub issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

mir.random.flex.internal.transformations

enum auto transform(string f0, string f1, string f2, string c);
Create a c-transformation, based on a function and it's first two derivatives
Tinflex expects the logarithm of the pdf, which means that for c = 0, no transformations need to be applied. However for c != 0 the inverse function is needed. We first need to apply the inverse T_c^{-1}(x) = exp(x) and then apply the other T_c transformation:
f(x) = exp(T_{c != 0}(x)) = exp(sgn(c) * x^c) = sgn(c) * exp(x * c)

Warning For performance reasons the transformation is directly applied, it is thus necessary to check before whether c == 0 and avoid the transformation.

Parameters:
f0 PDF function
f1 first derivative
f2 second derivative
Returns:
In-place code for the transformation
void transformInterval(S)(ref Interval!S iv);
Transform an Interval with a c-transformation by reference.
Parameters:
Interval!S iv Interval to be transformed
S antiderivative(bool common = false, S)(in S x, in S c);
Compute antiderivative FT of an inverse transformation: TF_C^-1 Table 1, column 4 of Botts et al. (2013).
S inverseAntiderivative(S)(in S x, in S c);
Compute inverse transformation of antiderivative T_c family given point x. Table 1, column 5 of Botts et al. (2013).