SST  14.0.0
StructuralSimulationToolkit
SST::RNG::ExponentialDistribution Class Reference

Creates an exponential distribution for use within SST. More...

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

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

Public Member Functions

 ExponentialDistribution (const double mn)
 Creates an exponential distribution with a specific lambda. More...
 
 ExponentialDistribution (const double mn, SST::RNG::Random *baseDist)
 Creates an exponential distribution with a specific lambda and a base random number generator. More...
 
 ~ExponentialDistribution ()
 Destroys the exponential distribution.
 
double getNextDouble () override
 Gets the next (random) double value in the distribution. More...
 
double getLambda ()
 Gets the lambda with which the distribution was created. More...
 
 ExponentialDistribution ()
 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::ExponentialDistribution) protected SST::RNG::RandombaseDistrib
 Serialization macro. More...
 
bool deleteDistrib
 Controls whether the base distribution should be deleted when this class is destructed.
 

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 an exponential distribution for use within SST.

This distribution is the same across platforms and compilers.

Constructor & Destructor Documentation

◆ ExponentialDistribution() [1/3]

SST::RNG::ExponentialDistribution::ExponentialDistribution ( const double  mn)
inline

Creates an exponential distribution with a specific lambda.

Parameters
mnThe lambda of the exponential distribution

◆ ExponentialDistribution() [2/3]

SST::RNG::ExponentialDistribution::ExponentialDistribution ( const double  mn,
SST::RNG::Random baseDist 
)
inline

Creates an exponential distribution with a specific lambda and a base random number generator.

Parameters
mnThe lambda of the exponential distribution
baseDistThe base random number generator to take the distribution from.

◆ ExponentialDistribution() [3/3]

SST::RNG::ExponentialDistribution::ExponentialDistribution ( )
inline

Default constructor.

FOR SERIALIZATION ONLY.

Member Function Documentation

◆ getLambda()

double SST::RNG::ExponentialDistribution::getLambda ( )
inline

Gets the lambda with which the distribution was created.

Returns
The lambda which the user created the distribution with

◆ getNextDouble()

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

Gets the next (random) double value in the distribution.

Returns
The next random double from the distribution

Implements SST::RNG::RandomDistribution.

Field Documentation

◆ baseDistrib

ImplementSerializable (SST::RNG::ExponentialDistribution) protected SST::RNG::Random* SST::RNG::ExponentialDistribution::baseDistrib

Serialization macro.

Sets the lambda of the exponential distribution. Sets the base random number generator for the distribution.


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