Learn R Programming

paradox (version 1.0.1)

Sampler1DRfun: Sampler1DRfun Class

Description

Arbitrary sampling from 1D RNG functions from R.

Arguments

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].


Method clone()

The objects of this class are cloneable with this method.

Usage

Sampler1DRfun$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

See Also

Other Sampler: Sampler, Sampler1D, Sampler1DCateg, Sampler1DNormal, Sampler1DUnif, SamplerHierarchical, SamplerJointIndep, SamplerUnif