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

#include <RandomFunctions.h>

Public Member Functions

 RandomFunctions (Random *random)
 
 ~RandomFunctions ()
 
double truncatedNormal (double mu, double sigma, double xMin, double xMax)
 
double customPDF (double xMin, double xMax, double step, const vector< double > &values)
 

Detailed Description

RandomFunctions class implements functions to generate random variates.

  • Truncated Gaussian
  • Custom Probability Density Function

Constructor & Destructor Documentation

◆ RandomFunctions()

RandomFunctions::RandomFunctions ( Random random)

RandomFunctions class constructor.

Parameters
randomPointer to a Random object.

◆ ~RandomFunctions()

RandomFunctions::~RandomFunctions ( )

RandomFunctions default class destructor.

Member Function Documentation

◆ customPDF()

double RandomFunctions::customPDF ( double  xMin,
double  xMax,
double  step,
const vector< double > &  values 
)

Returns the value of a random variate generated with a custom pdf given.

Parameters
xMinMin value of x.
xMaxMax value of x.
stepIncrement in x between xMin and xMax.
valuesVector with the shape of the custom pdf.
Returns
Value of the cumulative density function.

◆ truncatedNormal()

double RandomFunctions::truncatedNormal ( double  mu,
double  sigma,
double  xMin,
double  xMax 
)

Returns the value of a random variate generated with a truncated gaussian pdf.

Parameters
muMean of the gaussian.
sigmaStd. deviation of the gaussian.
xMinMin value of x.
xMaxMax value of x.
Returns
Value of the random variate.

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