 A Discrete-Event Network Simulator Home Tutorials  ▼ Docs    ▼ Develop ▼ API
ns3::WeibullVariable Class Reference

WeibullVariable distributed random varThis 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> Inheritance diagram for ns3::WeibullVariable:

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

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) 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: 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.

Definition at line 368 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 926 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
 m mean value of the distribution

Definition at line 931 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
 m Mean value for the distribution. s Shape (alpha) parameter for the distribution.

Definition at line 936 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
 m Mean value for the distribution. s Shape (alpha) parameter for the distribution. b Upper limit on returned values

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

References NS_LOG_FUNCTION.

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