12 #ifndef SST_CORE_RNG_UNIFORM_H
13 #define SST_CORE_RNG_UNIFORM_H
20 using namespace SST::RNG;
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);
Implements a Mersenne-based RNG for use in the SST core or components.
Definition: mersenne.h:35
Base class of statistical distributions in SST.
Definition: distrib.h:23
Implements the base class for random number generators for the SST core.
Definition: rng.h:28