12 #ifndef SST_CORE_RNG_UNIFORM_H
13 #define SST_CORE_RNG_UNIFORM_H
20 using namespace SST::RNG;
42 if ( probCount > 0 ) { probPerBin = 1.0 /
static_cast<double>(probCount); }
55 probCount(probsCount),
59 if ( probCount > 0 ) { probPerBin = 1.0 /
static_cast<double>(probCount); }
61 baseDistrib = baseDist;
69 if ( deleteDistrib ) {
delete baseDistrib; }
79 const double nextD = baseDistrib->nextUniform();
80 uint32_t current_bin = 1;
82 while ( nextD > (static_cast<double>(current_bin) * probPerBin) ) {
86 return static_cast<double>(current_bin - 1);
116 #endif // SST_CORE_RNG_UNIFORM_H
Implements the base class for random number generators for the SST core.
Definition: rng.h:27
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:22