12 #ifndef SST_CORE_RNG_UNIFORM_H 13 #define SST_CORE_RNG_UNIFORM_H 42 probCount(probsCount),
46 if ( probCount > 0 ) { probPerBin = 1.0 /
static_cast<double>(probCount); }
60 probCount(probsCount),
64 if ( probCount > 0 ) { probPerBin = 1.0 /
static_cast<double>(probCount); }
66 baseDistrib = baseDist;
74 if ( deleteDistrib ) {
delete baseDistrib; }
84 const double nextD = baseDistrib->nextUniform();
85 uint32_t current_bin = 1;
87 while ( nextD > (static_cast<double>(current_bin) * probPerBin) ) {
91 return static_cast<double>(current_bin - 1);
105 ser&
const_cast<bool&
>(deleteDistrib);
106 ser&
const_cast<uint32_t&
>(probCount);
142 #endif // SST_CORE_RNG_UNIFORM_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
Implements a Mersenne-based RNG for use in the SST core or components.
Definition: mersenne.h:34
Base class of statistical distributions in SST.
Definition: distrib.h:24