12#ifndef SST_CORE_RNG_DISCRETE_H
13#define SST_CORE_RNG_DISCRETE_H
22using namespace SST::RNG;
49 for ( uint32_t i = 0; i < probsCount; i++ ) {
70 for ( uint32_t i = 0; i < probsCount; i++ ) {
104 return (
double)index;
Creates a discrete distribution for use within SST.
Definition: discrete.h:34
~DiscreteDistribution()
Destroys the exponential distribution.
Definition: discrete.h:82
uint32_t probCount
Count of discrete probabilities.
Definition: discrete.h:126
DiscreteDistribution(const double *probs, const uint32_t probsCount, SST::RNG::Random *baseDist)
Creates an exponential distribution with a specific lambda and a base random number generator.
Definition: discrete.h:63
bool deleteDistrib
Controls whether the base distribution should be deleted when this class is destructed.
Definition: discrete.h:116
double getNextDouble()
Gets the next (random) double value in the distribution.
Definition: discrete.h:94
double * probabilities
The discrete probability list.
Definition: discrete.h:121
SST::RNG::Random * baseDistrib
Sets the base random number generator for the distribution.
Definition: discrete.h:111
DiscreteDistribution(const double *probs, const uint32_t probsCount)
Creates an exponential distribution with a specific lambda.
Definition: discrete.h:41
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
virtual double nextUniform()=0
Generates the next random number in the range [0,1).