A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::WeibullVariable Class Reference

WeibullVariable distributed random varThis class supports the creation of objects that return random numbers from a fixed weibull distribution. More...

#include <random-variable.h>

+ Inheritance diagram for ns3::WeibullVariable:
+ Collaboration diagram for ns3::WeibullVariable:

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...
 
- Public Member Functions inherited from ns3::RandomVariable
 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...
 
RandomVariableoperator= (const RandomVariable &o)
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::RandomVariable
 RandomVariable (const RandomVariableBase &variable)
 
RandomVariableBasePeek (void) const
 

Detailed Description

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: $ \frac{k}{\lambda}\left(\frac{x}{\lambda}\right)^{k-1}e^{-\left(\frac{x}{\lambda}\right)^k} $ where $ k > 0$ is the shape parameter and $ \lambda > 0$ is the scale parameter. The specified mean is related to the scale and shape parameters by the following relation: $ mean = \lambda\Gamma\left(1+\frac{1}{k}\right) $ where $ \Gamma $ is the Gamma function.

Definition at line 370 of file random-variable.h.

Constructor & Destructor Documentation

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 933 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.

Parameters
mmean value of the distribution

Definition at line 938 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).

Parameters
mMean value for the distribution.
sShape (alpha) parameter for the distribution.

Definition at line 943 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.

Parameters
mMean value for the distribution.
sShape (alpha) parameter for the distribution.
bUpper limit on returned values

Definition at line 948 of file random-variable.cc.

References NS_LOG_FUNCTION.


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