ns3::GammaVariable Class Reference
[Random Variable Distributions]

Gamma Distributed Random Variable

GammaVariable defines a random variable with gamma distribution. More...

#include <random-variable.h>

Inheritance diagram for ns3::GammaVariable:

Inheritance graph
[legend]
Collaboration diagram for ns3::GammaVariable:

Collaboration graph
[legend]

List of all members.

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.


Detailed Description

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: $ x^{\alpha-1} \frac{e^{-\frac{x}{\beta}}}{\beta^\alpha \Gamma(\alpha)}$ where $ mean = \alpha\beta $ and $ variance = \alpha \beta^2$


Constructor & Destructor Documentation

ns3::GammaVariable::GammaVariable (  ) 

Constructs a gamma random variable with alpha = 1.0 and beta = 1.0

ns3::GammaVariable::GammaVariable ( double  alpha,
double  beta 
)

Parameters:
alpha alpha parameter of the gamma distribution
beta beta parameter of the gamma distribution


Member Function Documentation

double ns3::GammaVariable::GetValue ( double  alpha,
double  beta 
) const

Returns a gamma random distributed double with parameters alpha and beta.

Parameters:
alpha alpha parameter of the gamma distribution
beta beta parameter of the gamma distribution
Returns:
A floating point random value

double ns3::GammaVariable::GetValue ( void   )  const

call RandomVariable::GetValue

Returns:
A floating point random value
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.


The documentation for this class was generated from the following file:

Generated on Fri Apr 9 15:01:09 2010 for NS-3 by  doxygen 1.5.8