scram::mef::RandomDeviate
Abstract base class for all deviate expressions. More...
#include <random_deviate.h>
Inherits from scram::mef::Expression, boost::noncopyable
Inherited by scram::mef::BetaDeviate, scram::mef::GammaDeviate, scram::mef::Histogram, scram::mef::LognormalDeviate, scram::mef::NormalDeviate, scram::mef::UniformDeviate
Public Functions
| Name | |
|---|---|
| virtual bool | IsDeviate() override<br>Determines if the value of the expression contains deviate expressions. |
| Expression(std::vector< Expression * > args ={})<br>Constructor for use by derived classes to register their arguments. | |
| void | seed(unsigned seed)<br>Sets the seed of the underlying random number generator. |
Protected Functions
| Name | |
|---|---|
| std::mt19937 & | rng() |
Additional inherited members
Public Functions inherited from scram::mef::Expression
| Name | |
|---|---|
| virtual | ~Expression() =default |
| const std::vector< Expression * > & | args() const |
| virtual void | Validate() const<br>Validates the expression. |
| virtual double | value() =0 |
| virtual Interval | interval() |
| double | Sample() |
| void | Reset()<br>This routine resets the sampling to get new values. |
Protected Functions inherited from scram::mef::Expression
| Name | |
|---|---|
| void | AddArg(Expression * arg)<br>Registers an additional argument expression. |
Detailed Description
class scram::mef::RandomDeviate;Abstract base class for all deviate expressions.
Note: Only single RNG is embedded for convenience. All the distributions share this RNG. This is not suitable for parallelized simulations!!!
These expressions provide quantification for uncertainty and sensitivity.
Public Functions Documentation
function IsDeviate
inline virtual bool IsDeviate() overrideDetermines if the value of the expression contains deviate expressions.
Return:
- true if the expression's value deviates from its mean.
- false if the expression's value does not need sampling.
Warning: Improper registration of arguments may yield silent failure.
Reimplements: scram::mef::Expression::IsDeviate
The default logic is to check arguments with uncertainties for sampling. Derived expression classes must decide if they don't have arguments, or if they are random deviates.
function Expression
explicit Expression(
std::vector< Expression * > args ={}
)Constructor for use by derived classes to register their arguments.
Parameters:
- args Arguments of this expression.
function seed
static inline void seed(
unsigned seed
)Sets the seed of the underlying random number generator.
Parameters:
- seed The seed for RNGs.
Note: This is static! Used by all the deriving deviates.
Protected Functions Documentation
function rng
inline std::mt19937 & rng()Return: RNG to be used by derived classes.
Updated on 2025-11-11 at 16:51:08 +0000
