WeibullVariable distributed random varThis class supports the creation of objects that return random numbers from a fixed weibull distribution. More...
#include <random-variable.h>
Public Member Functions | |
WeibullVariable () | |
Constructs a weibull random variable with a mean value of 1.0 and a shape (alpha) parameter of 1. More... | |
WeibullVariable (double m) | |
Constructs a weibull random variable with the specified mean value and a shape (alpha) parameter of 1.5. More... | |
WeibullVariable (double m, double s) | |
Constructs a weibull random variable with the specified mean value and a shape (alpha). More... | |
WeibullVariable (double m, double s, double b) | |
Constructs a weibull random variable with the specified mean. 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 |
WeibullVariable distributed random var
This class supports the creation of objects that return random numbers from a fixed weibull distribution.
It also supports the generation of single random numbers from various weibull distributions.
The probability density function is defined over the interval [0, +inf] as: where
is the shape parameter and
is the scale parameter. The specified mean is related to the scale and shape parameters by the following relation:
where
is the Gamma function.
Definition at line 370 of file random-variable.h.
ns3::WeibullVariable::WeibullVariable | ( | ) |
Constructs a weibull random variable with a mean value of 1.0 and a shape (alpha) parameter of 1.
Definition at line 934 of file random-variable.cc.
References NS_LOG_FUNCTION.
ns3::WeibullVariable::WeibullVariable | ( | double | m | ) |
Constructs a weibull random variable with the specified mean value and a shape (alpha) parameter of 1.5.
m | mean value of the distribution |
Definition at line 939 of file random-variable.cc.
References NS_LOG_FUNCTION.
ns3::WeibullVariable::WeibullVariable | ( | double | m, |
double | s | ||
) |
Constructs a weibull random variable with the specified mean value and a shape (alpha).
m | Mean value for the distribution. |
s | Shape (alpha) parameter for the distribution. |
Definition at line 944 of file random-variable.cc.
References NS_LOG_FUNCTION.
ns3::WeibullVariable::WeibullVariable | ( | double | m, |
double | s, | ||
double | b | ||
) |
Constructs a weibull random variable with the specified mean.
value, shape (alpha), and upper bound. Since WeibullVariable distributions can theoretically return unbounded values, it is sometimes usefull to specify a fixed upper limit. Note however that when the upper limit is specified, the true mean of the distribution is slightly smaller than the mean value specified.
m | Mean value for the distribution. |
s | Shape (alpha) parameter for the distribution. |
b | Upper limit on returned values |
Definition at line 949 of file random-variable.cc.
References NS_LOG_FUNCTION.