| Sampler1DRfun {paradox} | R Documentation |
Sampler1DRfun Class
Description
Arbitrary sampling from 1D RNG functions from R.
Super classes
paradox::Sampler -> paradox::Sampler1D -> Sampler1DRfun
Public fields
rfun(
function())
Random number generator function.trunc(
logical(1))
TRUEenables naive rejection sampling, so we stay inside of [lower, upper].
Methods
Public 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.rexpto sample from exponential distribution.trunc(
logical(1))
TRUEenables naive rejection sampling, so we stay inside of [lower, upper].
Method clone()
The objects of this class are cloneable with this method.
Usage
Sampler1DRfun$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
See Also
Other Sampler:
Sampler,
Sampler1D,
Sampler1DCateg,
Sampler1DNormal,
Sampler1DUnif,
SamplerHierarchical,
SamplerJointIndep,
SamplerUnif