latest version v1.9 - last update 10 Apr 2010 |
Base random number class. More...
#include <ltiContinuousRandDist.h>
Classes | |
class | parameters |
parameters of the random distribution More... | |
Public Member Functions | |
continuousRandomDistribution (bool reInit=false) | |
continuousRandomDistribution (const unsigned int theValue) | |
virtual | ~continuousRandomDistribution () |
virtual double | draw () const |
template<class T > | |
bool | apply (T &theObject) const |
virtual functor * | clone () const |
virtual const char * | getTypeName () const |
continuousRandomDistribution & | copy (const continuousRandomDistribution &other) |
Base random number class.
lti::continuousRandomDistribution::continuousRandomDistribution | ( | bool | reInit = false |
) |
default constructor.
Initializes the pseudo-random number generator using system time. If reInit is false, the generator is initialized only when instantiating the first continuousRandomDistribution object.
Referenced by clone().
lti::continuousRandomDistribution::continuousRandomDistribution | ( | const unsigned int | theValue | ) |
this constructor initializes the pseudo-random number generator using the given value
virtual lti::continuousRandomDistribution::~continuousRandomDistribution | ( | ) | [virtual] |
destructor
bool lti::continuousRandomDistribution::apply | ( | T & | theObject | ) | const [inline] |
virtual functor* lti::continuousRandomDistribution::clone | ( | ) | const [inline, virtual] |
returns a pointer to a clone of the functor.
Reimplemented from lti::randomDistribution.
Reimplemented in lti::exponentialDistribution, lti::gammaDistribution, lti::gaussianDistribution, lti::multivariateGaussian, lti::poissonDistribution, and lti::uniformDistribution.
References continuousRandomDistribution().
Referenced by lti::noise< T >::parameters::setDistribution().
continuousRandomDistribution& lti::continuousRandomDistribution::copy | ( | const continuousRandomDistribution & | other | ) |
copy member
Reimplemented from lti::randomDistribution.
Reimplemented in lti::gaussianDistribution, lti::multivariateGaussian, and lti::poissonDistribution.
virtual double lti::continuousRandomDistribution::draw | ( | ) | const [inline, virtual] |
draws a number from the distribution.
For this class the values are distributed uniformly in [0;1). This method always (for any distribution) returns a value between 0.0 (inclusive) and 1.0 (exclusive).
Reimplemented in lti::exponentialDistribution, lti::gammaDistribution, lti::gaussianDistribution, lti::multivariateGaussian, lti::poissonDistribution, and lti::uniformDistribution.
Referenced by apply(), and lti::paretoFront::rand().
virtual const char* lti::continuousRandomDistribution::getTypeName | ( | void | ) | const [inline, virtual] |
returns the name of this type
Reimplemented from lti::randomDistribution.
Reimplemented in lti::exponentialDistribution, lti::gammaDistribution, lti::gaussianDistribution, lti::multivariateGaussian, lti::poissonDistribution, and lti::uniformDistribution.