12 #ifndef SST_CORE_RNG_EXPON_H
13 #define SST_CORE_RNG_EXPON_H
20 using namespace SST::RNG;
56 baseDistrib = baseDist;
57 deleteDistrib =
false;
65 if ( deleteDistrib ) {
delete baseDistrib; }
74 const double next = baseDistrib->nextUniform();
75 return log(1 - next) / (-1 * lambda);
105 #endif // SST_CORE_RNG_EXPON_H
Implements the base class for random number generators for the SST core.
Definition: rng.h:27
double getLambda()
Gets the lambda with which the distribution was created.
Definition: expon.h:82
SST::RNG::Random * baseDistrib
Sets the base random number generator for the distribution.
Definition: expon.h:92
~ExponentialDistribution()
Destroys the exponential distribution.
Definition: expon.h:63
ExponentialDistribution(const double mn)
Creates an exponential distribution with a specific lambda.
Definition: expon.h:39
ExponentialDistribution(const double mn, SST::RNG::Random *baseDist)
Creates an exponential distribution with a specific lambda and a base random number generator...
Definition: expon.h:52
Implements a Mersenne-based RNG for use in the SST core or components.
Definition: mersenne.h:36
bool deleteDistrib
Controls whether the base distribution should be deleted when this class is destructed.
Definition: expon.h:97
double lambda
Sets the lambda of the exponential distribution.
Definition: expon.h:88
Base class of statistical distributions in SST.
Definition: distrib.h:22
Creates an exponential distribution for use within SST.
Definition: expon.h:31
double getNextDouble()
Gets the next (random) double value in the distribution.
Definition: expon.h:72