Sampler1DRfun: Sampler1DRfun Class

Sampler1DRfunR 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))
TRUE enables 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

(Param)
Domain / support of the distribution we want to sample from.

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: Sampler1DCateg, Sampler1DNormal, Sampler1DUnif, Sampler1D, SamplerHierarchical, SamplerJointIndep, SamplerUnif, Sampler


paradox documentation built on Nov. 21, 2022, 5:07 p.m.