Creates a Uniform distribution for use within SST. More...
#include "sst/core/rng/uniform.h"
Public Member Functions | |
SSTUniformDistribution (const uint32_t probsCount) | |
Creates an uniform distribution with a specific number of bins. | |
SSTUniformDistribution (const uint32_t probsCount, SSTRandom *baseDist) | |
Creates a Uniform distribution with a specific number of bins and user supplied random number generaotr. | |
~SSTUniformDistribution () | |
Destroys the distribution and will delete locally allocated RNGs. | |
double | getNextDouble () |
Gets the next (random) double value in the distribution. | |
Protected Attributes | |
SSTRandom * | baseDistrib |
Sets the base random number generator for the distribution. | |
bool | deleteDistrib |
Controls whether the base distribution should be deleted when this class is destructed. | |
uint32_t | probCount |
Count of discrete probabilities. |
Creates a Uniform distribution for use within SST.
This distribution is the same across platforms and compilers.
SST::RNG::SSTUniformDistribution::SSTUniformDistribution | ( | const uint32_t | probsCount | ) | [inline] |
Creates an uniform distribution with a specific number of bins.
probsCount | Number of probability bins in this distribution |
References baseDistrib, and deleteDistrib.
SST::RNG::SSTUniformDistribution::SSTUniformDistribution | ( | const uint32_t | probsCount, | |
SSTRandom * | baseDist | |||
) | [inline] |
Creates a Uniform distribution with a specific number of bins and user supplied random number generaotr.
probsCount | Number of probability bins in the distribution | |
baseDist | The base random number generator to take the distribution from. |
References baseDistrib, and deleteDistrib.
double SST::RNG::SSTUniformDistribution::getNextDouble | ( | ) | [inline, virtual] |
Gets the next (random) double value in the distribution.
Implements SST::RNG::SSTRandomDistribution.
References baseDistrib, SST::RNG::SSTRandom::nextUniform(), and probCount.