Learn R Programming

paradox (version 1.0.1)

Sampler: Sampler Class

Description

This is the abstract base class for sampling objects like Sampler1D, SamplerHierarchical or SamplerJointIndep.

Arguments

Public fields

param_set

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

Methods


Method new()

Creates a new instance of this R6 class.

Note that this object is typically constructed via derived classes, e.g., Sampler1D.

Usage

Sampler$new(param_set)

Arguments

param_set

(ParamSet)
The ParamSet to associated with this Sampler.


Method sample()

Sample n values from the distribution.

Usage

Sampler$sample(n)

Arguments

n

(integer(1)).

Returns

Design.


Method format()

Helper for print outputs.

Usage

Sampler$format(...)

Arguments

...

(ignored).


Method print()

Printer.

Usage

Sampler$print(...)

Arguments

...

(ignored).


Method clone()

The objects of this class are cloneable with this method.

Usage

Sampler$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

See Also

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