CESampler
Abstract base class for the sampling mechanism (the "reference distribution") used by the Cross-Entropy method. Sub-classes implement the distribution-specific behavior: generating a sample (via MVSampleIfc), updating the parameters from an elite sample, and reporting convergence. The Cross-Entropy method permits different reference distributions; CENormalSampler is the multivariate-normal default and currently the only implementation.
A sampler is self-sufficient: by default it owns a fresh provider and a stream, so it can be exercised standalone (for example, in tests) without a CrossEntropySolver. When a sampler is handed to a solver, the solver adopts it onto the solver's own stream provider, on a stream distinct from the solver's base stream. That adoption is the single point at which the two providers become the same. The adoption is performed only by the owning solver (it is module-internal), so client code cannot reassign a sampler's stream and short-circuit the process.
Parameters
the problem definition associated with the sampling process
the stream number used while the sampler is standalone (unattached); 0 (the default) means the next available stream. It is superseded once the sampler is attached to a solver.
the provider used while the sampler is standalone; defaults to a fresh RNStreamProvider so the sampler has its own streams. It is replaced by the solver's provider on attachment.
Inheritors
Constructors
Properties
If true, the stream will automatically participate in having its stream advanced to the next sub-stream via stream managers
Tells the stream to start producing antithetic variates
If true, the stream will automatically participate in having its stream reset to its start stream via stream managers
The random number stream used by the sampler. Initially drawn from the sampler's own provider; replaced with a distinct stream from the solver's provider when the sampler is attached.
The assigned stream number of the current stream within the current provider.
The stream provider currently backing this sampler. Initially the sampler's own provider; replaced by the owning solver's provider when the sampler is attached.
Functions
Positions the RNG at the beginning of its next substream
Specifies the initial values of the underlying sampling mechanism.
The resetStartStream method will position the RNG at the beginning of its stream. This is the same location in the stream as assigned when the RNG was created and initialized.
Resets the position of the RNG at the start of the current substream
The underlying parameters of the sampling mechanism should be updated. Implementors need to handle the edge case of fewer than 2 elites.