#include <SGUniformRandom.h>
|
std::unique_ptr< SampleGenerator > | makeNewborn (std::size_t numSampleBatches) const override |
| Make a new generator.
|
|
| SampleGenerator (std::size_t numSampleBatches, std::size_t maxCachedBatches) |
|
| SampleGenerator (std::size_t numSampleBatches) |
|
| SampleGenerator (std::size_t numSampleBatches, std::size_t maxCachedBatches) |
|
| SampleGenerator (std::size_t numSampleBatches) |
|
virtual | ~SampleGenerator ()=default |
|
virtual void | rebirth () |
| Reset this generator to its initial state, reviving it from dead state. Calling this method starts a new life cycle–all existing sample stages and values are lost, and references to them are invalidated. New declarations can be made after, and new sample values can be generated.
|
|
void | genSplitted (std::size_t numSplits, std::vector< std::unique_ptr< SampleGenerator > > &out_sgs) const |
|
bool | prepareSampleBatch () |
| Generates sample values for current sample batch. Advances all sample values in all stages to the next batch. Will potentially generate sample values for more than one batch at once (cached).
|
|
SamplesNDHandle | declareStageND (std::size_t numDims, std::size_t numSamples) |
| Similar to declareStageND() , with default size hints.
|
|
SamplesNDHandle | declareStageND (std::size_t numDims, std::size_t numSamples, std::vector< std::size_t > dimSizeHints) |
| Declares a N-dimensional sample stage. A sample stage contains information for how the samples will be used, number of samples, etc. These information can help the sample generator to produce sample values of better quality. This method can only be called before sample batches are generated (before any call to prepareSampleBatch() ).
|
|
SamplesNDStream | getSamplesND (const SamplesNDHandle &handle) const |
| Gets generated N-dimensional sample values in a stage. This method can only be called after sample batches are generated (after any call to prepareSampleBatch() ).
|
|
std::size_t | numSampleBatches () const |
|
std::size_t | maxCachedBatches () const |
|
std::size_t | numRemainingBatches () const |
|
bool | hasMoreBatches () const |
|
◆ makeNewborn()
std::unique_ptr< SampleGenerator > ph::SGUniformRandom::makeNewborn |
( |
std::size_t | numSampleBatches | ) |
const |
|
overridevirtual |
Make a new generator.
- Returns
- The new generator. Newborn generator may not have the same internal state as its ancestor.
Implements ph::SampleGenerator.
◆ SampleGenerator() [1/2]
ph::SampleGenerator::SampleGenerator |
( |
std::size_t | numSampleBatches | ) |
|
|
explicit |
◆ SampleGenerator() [2/2]
ph::SampleGenerator::SampleGenerator |
( |
std::size_t | numSampleBatches, |
|
|
std::size_t | maxCachedBatches ) |
The documentation for this class was generated from the following files: