60 gsl_qrng *generator = gsl_qrng_alloc(gsl_qrng_sobol,
static_cast<unsigned int>(ndims));
65 throw std::invalid_argument(
"SobolSequence::setNumberOfDimensions - "
66 "Error initializing sequence, insufficient memory.");
std::vector< double > & getNextPointCache()
Some generators need direct access to the cache.
Defines an interface to a quasi-random number sequence.
SobolSequence()=delete
Disable default constructor.
void setNumberOfDimensions(const unsigned int ndims)
Set the number of dimensions.
void generateNextPoint() override
Generates the next value in the sequence.
void save() override
Saves the current state of the generator.
void deleteCurrentGenerator()
Frees resources allocated by current generator.
void restore() override
Restores the generator to the last saved point, or the beginning if nothing has been saved.
gsl_qrng * m_gslGenerator
GSL quasi-random number state generator.
~SobolSequence() override
Destructor.
void restart() override
Reset the sequence.
gsl_qrng * m_savedGenerator
Allocated object for save state calls.