Arbitrary sampling from 1D RNG functions from R.
See also
Other Sampler:
Sampler
,
Sampler1D
,
Sampler1DCateg
,
Sampler1DNormal
,
Sampler1DUnif
,
SamplerHierarchical
,
SamplerJointIndep
,
SamplerUnif
Super classes
paradox::Sampler
-> paradox::Sampler1D
-> Sampler1DRfun
Public fields
rfun
(
function()
)
Random number generator function.trunc
(
logical(1)
)TRUE
enables naive rejection sampling, so we stay inside of [lower, upper].
Methods
Inherited methods
Method new()
Creates a new instance of this R6 class.
Usage
Sampler1DRfun$new(param, rfun, trunc = TRUE)
Arguments
param
(
ParamSet
)
Domain / support of the distribution we want to sample from. Must be one-dimensional.rfun
(
function()
)
Random number generator function, e.g.rexp
to sample from exponential distribution.trunc
(
logical(1)
)TRUE
enables naive rejection sampling, so we stay inside of [lower, upper].