A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::ParetoVariableImpl Class Reference
+ Inheritance diagram for ns3::ParetoVariableImpl:
+ Collaboration diagram for ns3::ParetoVariableImpl:

Public Member Functions

 ParetoVariableImpl ()
 ParetoVariableImpl (double m)
 Constructs a pareto random variable with specified mean and shape parameter of 1.5.
 ParetoVariableImpl (double m, double s)
 Constructs a pareto random variable with the specified mean value and shape parameter. Beware, s must be strictly greater than 1.
 ParetoVariableImpl (double m, double s, double b)
 Constructs a pareto random variable with the specified mean value, shape (alpha), and upper bound. Beware, s must be strictly greater than 1.
 ParetoVariableImpl (std::pair< double, double > params)
 Constructs a pareto random variable with the specified scale and shape parameters.
 ParetoVariableImpl (std::pair< double, double > params, double b)
 Constructs a pareto random variable with the specified scale, shape (alpha), and upper bound.
 ParetoVariableImpl (const ParetoVariableImpl &c)
virtual RandomVariableBaseCopy () const
virtual double GetValue ()
- Public Member Functions inherited from ns3::RandomVariableBase
 RandomVariableBase ()
 RandomVariableBase (const RandomVariableBase &o)
virtual ~RandomVariableBase ()
virtual uint32_t GetInteger ()
RngStreamGetStream (void)

Private Attributes

double m_bound
double m_scale
double m_shape

Detailed Description

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

Constructor & Destructor Documentation

ns3::ParetoVariableImpl::ParetoVariableImpl ( )

Constructs a pareto random variable with a mean of 1 and a shape parameter of 1.5

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

Referenced by Copy().

+ Here is the caller graph for this function:

ns3::ParetoVariableImpl::ParetoVariableImpl ( double  m)
explicit

Constructs a pareto random variable with specified mean and shape parameter of 1.5.

Parameters
mMean value of the distribution

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

ns3::ParetoVariableImpl::ParetoVariableImpl ( double  m,
double  s 
)

Constructs a pareto random variable with the specified mean value and shape parameter. Beware, s must be strictly greater than 1.

Parameters
mMean value of the distribution
sShape parameter for the distribution

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

ns3::ParetoVariableImpl::ParetoVariableImpl ( double  m,
double  s,
double  b 
)

Constructs a pareto random variable with the specified mean value, shape (alpha), and upper bound. Beware, s must be strictly greater than 1.

Since pareto distributions can theoretically return unbounded values, it is sometimes useful to specify a fixed upper limit. Note however when the upper limit is specified, the true mean of the distribution is slightly smaller than the mean value specified.

Parameters
mMean value
sShape parameter
bUpper limit on returned values

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

ns3::ParetoVariableImpl::ParetoVariableImpl ( std::pair< double, double >  params)

Constructs a pareto random variable with the specified scale and shape parameters.

Parameters
paramsthe two parameters, respectively scale and shape, of the distribution

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

ns3::ParetoVariableImpl::ParetoVariableImpl ( std::pair< double, double >  params,
double  b 
)

Constructs a pareto random variable with the specified scale, shape (alpha), and upper bound.

Since pareto distributions can theoretically return unbounded values, it is sometimes useful to specify a fixed upper limit. Note however when the upper limit is specified, the true mean of the distribution is slightly smaller than the mean value specified.

Parameters
paramsthe two parameters, respectively scale and shape, of the distribution
bUpper limit on returned values

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

ns3::ParetoVariableImpl::ParetoVariableImpl ( const ParetoVariableImpl c)

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

Member Function Documentation

RandomVariableBase * ns3::ParetoVariableImpl::Copy ( void  ) const
virtual

Implements ns3::RandomVariableBase.

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

References ParetoVariableImpl().

+ Here is the call graph for this function:

double ns3::ParetoVariableImpl::GetValue ( void  )
virtual
Returns
A random value from this Pareto distribution

Implements ns3::RandomVariableBase.

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

References ns3::RandomVariableBase::GetStream(), m_bound, m_scale, m_shape, and ns3::RngStream::RandU01().

+ Here is the call graph for this function:

Member Data Documentation

double ns3::ParetoVariableImpl::m_bound
private

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

Referenced by GetValue().

double ns3::ParetoVariableImpl::m_scale
private

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

Referenced by GetValue().

double ns3::ParetoVariableImpl::m_shape
private

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

Referenced by GetValue().


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