GammaVariable 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. |
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 |
Reimplemented from ns3::RandomVariable.