paradox (version 0.5.0)

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

Public 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) Domain / support of the distribution we want to sample from. ParamSet is cloned on construction.

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()

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