12 #ifndef SST_CORE_RNG_POISSON_H 13 #define SST_CORE_RNG_POISSON_H 54 baseDistrib = baseDist;
55 deleteDistrib =
false;
63 if ( deleteDistrib ) {
delete baseDistrib; }
72 const double L = exp(-lambda);
78 p *= baseDistrib->nextUniform();
100 ser&
const_cast<double&
>(lambda);
131 #endif // SST_CORE_RNG_POISSON_H Implements the base class for random number generators for the SST core.
Definition: rng.h:29
ImplementSerializable(PoissonDistribution) protected SST::RNG::Random * baseDistrib
Serialization macro.
Definition: poisson.h:108
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
PoissonDistribution()
Default constructor.
Definition: poisson.h:93
bool deleteDistrib
Controls whether the base distribution should be deleted when this class is destructed.
Definition: poisson.h:123
~PoissonDistribution()
Destroys the Poisson distribution.
Definition: poisson.h:61
Implements a Mersenne-based RNG for use in the SST core or components.
Definition: mersenne.h:34
PoissonDistribution(const double mn, SST::RNG::Random *baseDist)
Creates an Poisson distribution with a specific lambda and a base random number generator.
Definition: poisson.h:51
double getNextDouble() override
Gets the next (random) double value in the distribution.
Definition: poisson.h:70
double getLambda()
Gets the lambda with which the distribution was created.
Definition: poisson.h:88
PoissonDistribution(const double mn)
Creates an Poisson distribution with a specific lambda.
Definition: poisson.h:39
Creates an Poisson distribution for use within SST.
Definition: poisson.h:31
Base class of statistical distributions in SST.
Definition: distrib.h:24
void serialize_order(SST::Core::Serialization::serializer &ser) override
Serialization function for checkpoint.
Definition: poisson.h:98