last update 20 Sep 2009 |
#include <cvrRandomDistribution.h>
Public Member Functions | |
parameters () | |
parameters (const parameters &other) | |
~parameters () | |
parameters & | copy (const parameters &other) |
parameters & | operator= (const parameters &other) |
virtual const std::string & | name () const |
virtual parameters * | clone () const |
virtual parameters * | newInstance () const |
virtual bool | write (ioHandler &handler, const bool complete=true) const |
virtual bool | read (ioHandler &handler, const bool complete=true) |
Public Attributes | |
eNumberGenerator | generator |
uint32 | seed |
std::string | device |
cvr::randomDistribution::randomDistribution::parameters::parameters | ( | ) |
Default constructor.
Reimplemented from cvr::functor::functor::parameters.
Reimplemented in cvr::normalDistribution::normalDistribution::parameters, cvr::uniformContinuousDistribution::uniformContinuousDistribution::parameters, and cvr::uniformDiscreteDistribution::uniformDiscreteDistribution::parameters.
cvr::randomDistribution::randomDistribution::parameters::parameters | ( | const parameters & | other | ) |
Copy constructor.
other | the parameters object to be copied |
Reimplemented from cvr::functor::functor::parameters.
Reimplemented in cvr::normalDistribution::normalDistribution::parameters, cvr::uniformContinuousDistribution::uniformContinuousDistribution::parameters, and cvr::uniformDiscreteDistribution::uniformDiscreteDistribution::parameters.
cvr::randomDistribution::randomDistribution::parameters::~parameters | ( | ) | [virtual] |
virtual parameters* cvr::randomDistribution::randomDistribution::parameters::clone | ( | ) | const [virtual] |
Returns a pointer to a clone of the parameters.
Implements cvr::functor::functor::parameters.
Reimplemented in cvr::normalDistribution::normalDistribution::parameters, cvr::uniformContinuousDistribution::uniformContinuousDistribution::parameters, and cvr::uniformDiscreteDistribution::uniformDiscreteDistribution::parameters.
parameters& cvr::randomDistribution::randomDistribution::parameters::copy | ( | const parameters & | other | ) |
Copy the contents of a parameters object.
other | the parameters object to be copied |
Reimplemented in cvr::normalDistribution::normalDistribution::parameters, cvr::uniformContinuousDistribution::uniformContinuousDistribution::parameters, and cvr::uniformDiscreteDistribution::uniformDiscreteDistribution::parameters.
virtual const std::string& cvr::randomDistribution::randomDistribution::parameters::name | ( | ) | const [virtual] |
Returns the complete name of the parameters class.
Implements cvr::functor::functor::parameters.
Reimplemented in cvr::normalDistribution::normalDistribution::parameters, cvr::uniformContinuousDistribution::uniformContinuousDistribution::parameters, and cvr::uniformDiscreteDistribution::uniformDiscreteDistribution::parameters.
virtual parameters* cvr::randomDistribution::randomDistribution::parameters::newInstance | ( | ) | const [virtual] |
Returns a pointer to a new instance of the parameters.
Implements cvr::functor::functor::parameters.
Reimplemented in cvr::normalDistribution::normalDistribution::parameters, cvr::uniformContinuousDistribution::uniformContinuousDistribution::parameters, and cvr::uniformDiscreteDistribution::uniformDiscreteDistribution::parameters.
parameters& cvr::randomDistribution::randomDistribution::parameters::operator= | ( | const parameters & | other | ) |
Copy the contents of a parameters object.
other | the parameters object to be copied |
Reimplemented in cvr::normalDistribution::normalDistribution::parameters, cvr::uniformContinuousDistribution::uniformContinuousDistribution::parameters, and cvr::uniformDiscreteDistribution::uniformDiscreteDistribution::parameters.
virtual bool cvr::randomDistribution::randomDistribution::parameters::read | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | [virtual] |
Read the parameters from the given ioHandler.
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from cvr::parametersManager::parametersManager::parameters.
Reimplemented in cvr::normalDistribution::normalDistribution::parameters, cvr::uniformContinuousDistribution::uniformContinuousDistribution::parameters, and cvr::uniformDiscreteDistribution::uniformDiscreteDistribution::parameters.
virtual bool cvr::randomDistribution::randomDistribution::parameters::write | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | const [virtual] |
Write the parameters in the given ioHandler.
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from cvr::parametersManager::parametersManager::parameters.
Reimplemented in cvr::normalDistribution::normalDistribution::parameters, cvr::uniformContinuousDistribution::uniformContinuousDistribution::parameters, and cvr::uniformDiscreteDistribution::uniformDiscreteDistribution::parameters.
std::string cvr::randomDistribution::randomDistribution::parameters::device |
Name of the device for the stochastic number generator.
This is used only if generator=Stochastic. In case the given device does not exist, setting the parameters will fail, and the corresponding status string will be set accordingly.
Default value: "/dev/urandom"
eNumberGenerator cvr::randomDistribution::randomDistribution::parameters::generator |
Type of number generator to be used.
Default value: MT
uint32 cvr::randomDistribution::randomDistribution::parameters::seed |
Seed for the number generator.
The seed is not allowed to be 0. In that case, no seed setting will be done.
Default value: 15485863 (the 1 millionth prime number)