Class NormalVariable defines a random variable with a normal (Gaussian) distribution. More...
#include <random-variable.h>
Public Member Functions | |
NormalVariable () | |
Constructs an normal random variable with a mean value of 0 and variance of 1. More... | |
NormalVariable (double m, double v) | |
Construct a normal random variable with specified mean and variance. More... | |
NormalVariable (double m, double v, double b) | |
Construct a normal random variable with specified mean and variance. More... | |
![]() | |
RandomVariable () | |
RandomVariable (const RandomVariable &o) | |
~RandomVariable () | |
uint32_t | GetInteger (void) const |
Returns a random integer integer from the underlying distribution. More... | |
double | GetValue (void) const |
Returns a random double from the underlying distribution. More... | |
RandomVariable & | operator= (const RandomVariable &o) |
Additional Inherited Members | |
![]() | |
RandomVariable (const RandomVariableBase &variable) | |
RandomVariableBase * | Peek (void) const |
Class NormalVariable defines a random variable with a normal (Gaussian) distribution.
This class supports the creation of objects that return random numbers from a fixed normal distribution. It also supports the generation of single random numbers from various normal distributions.
The density probability function is defined over the interval (-inf,+inf) as: where
and
Definition at line 424 of file random-variable.h.
ns3::NormalVariable::NormalVariable | ( | ) |
Constructs an normal random variable with a mean value of 0 and variance of 1.
Definition at line 1097 of file random-variable.cc.
References NS_LOG_FUNCTION.
ns3::NormalVariable::NormalVariable | ( | double | m, |
double | v | ||
) |
Construct a normal random variable with specified mean and variance.
m | Mean value |
v | Variance |
Definition at line 1102 of file random-variable.cc.
References NS_LOG_FUNCTION.
ns3::NormalVariable::NormalVariable | ( | double | m, |
double | v, | ||
double | b | ||
) |
Construct a normal random variable with specified mean and variance.
m | Mean value |
v | Variance |
b | Bound. The NormalVariable is bounded symmetrically about the mean [mean-bound,mean+bound] |
Definition at line 1107 of file random-variable.cc.
References NS_LOG_FUNCTION.