Returns an TRUNCATED distribution object that limits the values that are
generated by the distribution to be in the limits p_min, p_max
Note
The expected value of a truncated distribution could be very
different from the expected value of the unrestricted distribution. Be
careful as the oval field is not changed and may not represent
any more the expected value of the distribution.
If the distribution is multidimensional, the limits will apply to all dimensions.
Examples
myDistr <- new_TRUNCATED(p_distribution = new_NORMAL(0,1), p_min = -1, p_max = 1)
myDistr$rfunc(10)
#> rvar
#> 1 0.672202668
#> 2 -0.826257346
#> 3 -0.291895927
#> 4 -0.777817076
#> 5 -0.348553841
#> 6 1.000000000
#> 7 -0.314772157
#> 8 -0.005381841
#> 9 -1.000000000
#> 10 1.000000000
