12 #ifndef SST_CORE_RNG_EXPON_H 13 #define SST_CORE_RNG_EXPON_H 56 baseDistrib = baseDist;
57 deleteDistrib =
false;
65 if ( deleteDistrib ) {
delete baseDistrib; }
74 const double next = baseDistrib->nextUniform();
75 return log(1 - next) / (-1 * lambda);
125 #endif // SST_CORE_RNG_EXPON_H Implements the base class for random number generators for the SST core.
Definition: rng.h:29
Definition: constant.h:21
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition: serializer.h:35
double getLambda()
Gets the lambda with which the distribution was created.
Definition: expon.h:82
~ExponentialDistribution()
Destroys the exponential distribution.
Definition: expon.h:63
ExponentialDistribution()
Default constructor.
Definition: expon.h:87
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
void serialize_order(SST::Core::Serialization::serializer &ser) override
Serialization function for checkpoint.
Definition: expon.h:92
Implements a Mersenne-based RNG for use in the SST core or components.
Definition: mersenne.h:34
bool deleteDistrib
Controls whether the base distribution should be deleted when this class is destructed.
Definition: expon.h:117
double getNextDouble() override
Gets the next (random) double value in the distribution.
Definition: expon.h:72
ImplementSerializable(SST::RNG::ExponentialDistribution) protected SST::RNG::Random * baseDistrib
Serialization macro.
Definition: expon.h:102
Base class of statistical distributions in SST.
Definition: distrib.h:24
Creates an exponential distribution for use within SST.
Definition: expon.h:31