SST  14.0.0
StructuralSimulationToolkit
SST::RNG::GaussianDistribution Class Reference

Creates a Gaussian (normal) distribution for which to sample. More...

#include "sst/core/rng/gaussian.h"

Inheritance diagram for SST::RNG::GaussianDistribution:
SST::RNG::RandomDistribution SST::Core::Serialization::serializable

Public Member Functions

 GaussianDistribution (double mn, double sd)
 Creates a new distribution with a predefined random number generator with a specified mean and standard deviation. More...
 
 GaussianDistribution (double mn, double sd, SST::RNG::Random *baseRNG)
 Creates a new distribution with a predefined random number generator with a specified mean and standard deviation. More...
 
 ~GaussianDistribution ()
 Destroys the Gaussian distribution.
 
double getNextDouble () override
 Gets the next double value in the distribution. More...
 
double getMean ()
 Gets the mean of the distribution. More...
 
double getStandardDev ()
 Gets the standard deviation of the distribution. More...
 
 GaussianDistribution ()
 Default constructor. More...
 
void serialize_order (SST::Core::Serialization::serializer &ser) override
 Serialization function for checkpoint.
 
- Public Member Functions inherited from SST::RNG::RandomDistribution
virtual ~RandomDistribution ()
 Destroys the distribution.
 
 RandomDistribution ()
 Creates the base (abstract) class of a distribution.
 
virtual void serialize_order (SST::Core::Serialization::serializer &UNUSED(ser)) override
 
- Public Member Functions inherited from SST::Core::Serialization::serializable
virtual const char * cls_name () const =0
 
virtual uint32_t cls_id () const =0
 
virtual std::string serialization_name () const =0
 

Data Fields

ImplementSerializable(SST::RNG::GaussianDistribution) protected double stddev
 Serialization macro. More...
 
SST::RNG::RandombaseDistrib
 The base random number generator for the distribution.
 
double unusedPair
 Random numbers for the distribution are read in pairs, this stores the second of the pair.
 
bool usePair
 Random numbers for the distribution are read in pairs, this tells the code to use the second of the pair.
 
bool deleteDistrib
 Controls whether the destructor deletes the distribution (we need to ensure we do this IF we created the distribution)
 

Additional Inherited Members

- Static Public Attributes inherited from SST::Core::Serialization::serializable
static constexpr uint32_t NullClsId = std::numeric_limits<uint32_t>::max()
 
- Protected Types inherited from SST::Core::Serialization::serializable
enum  cxn_flag_t { ConstructorFlag }
 
- Static Protected Member Functions inherited from SST::Core::Serialization::serializable
static void serializable_abort (uint32_t line, const char *file, const char *func, const char *obj)
 

Detailed Description

Creates a Gaussian (normal) distribution for which to sample.

Constructor & Destructor Documentation

◆ GaussianDistribution() [1/3]

SST::RNG::GaussianDistribution::GaussianDistribution ( double  mn,
double  sd 
)
inline

Creates a new distribution with a predefined random number generator with a specified mean and standard deviation.

Parameters
mnThe mean of the Gaussian distribution
sdThe standard deviation of the Gaussian distribution

◆ GaussianDistribution() [2/3]

SST::RNG::GaussianDistribution::GaussianDistribution ( double  mn,
double  sd,
SST::RNG::Random baseRNG 
)
inline

Creates a new distribution with a predefined random number generator with a specified mean and standard deviation.

Parameters
mnThe mean of the Gaussian distribution
sdThe standard deviation of the Gaussian distribution
baseRNGThe random number generator as the base of the distribution

◆ GaussianDistribution() [3/3]

SST::RNG::GaussianDistribution::GaussianDistribution ( )
inline

Default constructor.

FOR SERIALIZATION ONLY.

Member Function Documentation

◆ getMean()

double SST::RNG::GaussianDistribution::getMean ( )
inline

Gets the mean of the distribution.

Returns
The mean of the Guassian distribution

◆ getNextDouble()

double SST::RNG::GaussianDistribution::getNextDouble ( )
inlineoverridevirtual

Gets the next double value in the distribution.

Returns
The next double value of the distribution (in this case a Gaussian distribution)

Implements SST::RNG::RandomDistribution.

◆ getStandardDev()

double SST::RNG::GaussianDistribution::getStandardDev ( )
inline

Gets the standard deviation of the distribution.

Returns
The standard deviation of the Gaussian distribution

Field Documentation

◆ stddev

ImplementSerializable (SST::RNG::GaussianDistribution) protected double SST::RNG::GaussianDistribution::stddev

Serialization macro.

The mean of the Gaussian distribution The standard deviation of the Gaussian distribution


The documentation for this class was generated from the following file: