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

Public Member Functions

 ZipfVariableImpl (long n, double alpha)
 
 ZipfVariableImpl ()
 A zipf variable with N=1 and alpha=0. More...
 
virtual RandomVariableBaseCopy (void) 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_alpha
 
double m_c
 
long m_n
 

Detailed Description

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

Constructor & Destructor Documentation

ns3::ZipfVariableImpl::ZipfVariableImpl ( long  n,
double  alpha 
)
Parameters
nthe number of possible items
alphathe alpha parameter

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

References m_c, and NS_LOG_FUNCTION.

ns3::ZipfVariableImpl::ZipfVariableImpl ( )

A zipf variable with N=1 and alpha=0.

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

References NS_LOG_FUNCTION.

Referenced by Copy().

+ Here is the caller graph for this function:

Member Function Documentation

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

Implements ns3::RandomVariableBase.

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

References m_alpha, m_n, NS_LOG_FUNCTION, and ZipfVariableImpl().

+ Here is the call graph for this function:

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

Implements ns3::RandomVariableBase.

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

References ns3::RandomVariableBase::GetStream(), m_alpha, m_c, m_n, NS_LOG_FUNCTION, and ns3::RngStream::RandU01().

+ Here is the call graph for this function:

Member Data Documentation

double ns3::ZipfVariableImpl::m_alpha
private

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

Referenced by Copy(), and GetValue().

double ns3::ZipfVariableImpl::m_c
private

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

Referenced by GetValue(), and ZipfVariableImpl().

long ns3::ZipfVariableImpl::m_n
private

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

Referenced by Copy(), and GetValue().


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