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. More...
#include <random-variable.h>
Public Member Functions | |
WeibullVariable () | |
WeibullVariable (double m) | |
WeibullVariable (double m, double s) | |
WeibullVariable (double m, double s, double b) | |
Constructs a weibull random variable with the specified mean. |
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.
ns3::WeibullVariable::WeibullVariable | ( | ) |
Constructs a weibull random variable with a mean value of 1.0 and a shape (alpha) parameter of 1
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 |
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. |
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 |