OSFEG-C++  1.4.6
OpenSF Error Generation Library
Stochastic Class Reference

#include <Stochastic.h>

Inheritance diagram for Stochastic:
Composite

Public Member Functions

 Stochastic (string type, int32_t seed)
 
 ~Stochastic ()
 
double getValue (double time)
 
void setSeed (int32_t seed)
 
void reset ()
 
- Public Member Functions inherited from Composite
 Composite ()
 
 Composite (const Composite &)=delete
 
Compositeoperator= (const Composite &)=delete
 
 Composite (Composite &&)=default
 
Compositeoperator= (Composite &&)=default
 
virtual ~Composite ()
 
void add (Composite *node)
 
void remove (Composite *node)
 
CompositegetChild (int index)
 
bool hasChildNodes () const
 

Additional Inherited Members

- Protected Attributes inherited from Composite
std::vector< Composite * > children
 
Compositeparent
 

Detailed Description

Calculates a perturbation modeled as a random stochastic process. This class implements functions that return the random variate value with pdf:

  • Beta
  • Gamma
  • Exponential
  • Normal
  • Uniform
  • Truncated Gaussian
  • Custom
  • Poisson
  • Uniform Discrete

Constructor & Destructor Documentation

◆ Stochastic()

Stochastic::Stochastic ( string  type,
int32_t  seed 
)

Stochastic class constructor.

Parameters
typeString with the error type description.
seedSeed needed to generate a random number.

◆ ~Stochastic()

Stochastic::~Stochastic ( )

Stochastic class destructor

Member Function Documentation

◆ getValue()

double Stochastic::getValue ( double  time)
virtual

Returns the value of a perturbation that follows a random pattern.

Overwrites method getValue from parent class Composite.

Parameters
timeDouble with the time in which the error is evaluated.
Returns
Value of the perturbation.

Reimplemented from Composite.

◆ reset()

void Stochastic::reset ( )

Resets the seed in the random variate engine.

◆ setSeed()

void Stochastic::setSeed ( int32_t  seed)

Sets the seed in the random variate engine.


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