Gamma Distributed Random VariableGammaVariable defines a random variable with gamma distribution. More...
#include <random-variable.h>


Public Member Functions | |
| GammaVariable () | |
| GammaVariable (double alpha, double beta) | |
| double | GetValue (void) const |
| call RandomVariable::GetValue | |
| double | GetValue (double alpha, double beta) const |
| Returns a gamma random distributed double with parameters alpha and beta. | |
Gamma Distributed Random Variable
GammaVariable defines a random variable with gamma distribution.
This class supports the creation of objects that return random numbers from a fixed gamma distribution. It also supports the generation of single random numbers from various gamma distributions.
The probability density function is defined over the interval [0,+inf) as:
where
and
| ns3::GammaVariable::GammaVariable | ( | ) |
Constructs a gamma random variable with alpha = 1.0 and beta = 1.0
| ns3::GammaVariable::GammaVariable | ( | double | alpha, | |
| double | beta | |||
| ) |
| alpha | alpha parameter of the gamma distribution | |
| beta | beta parameter of the gamma distribution |
| double ns3::GammaVariable::GetValue | ( | double | alpha, | |
| double | beta | |||
| ) | const |
Returns a gamma random distributed double with parameters alpha and beta.
| alpha | alpha parameter of the gamma distribution | |
| beta | beta parameter of the gamma distribution |
| double ns3::GammaVariable::GetValue | ( | void | ) | const |
Note: we have to re-implement this method here because the method is overloaded below for the two-argument variant and the c++ name resolution rules don't work well with overloads split between parent and child classes.
Reimplemented from ns3::RandomVariable.
1.6.1