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

Public Member Functions

 SequentialVariableImpl (double f, double l, double i=1, uint32_t c=1)
 Constructor for the SequentialVariableImpl RNG.
 SequentialVariableImpl (double f, double l, const RandomVariable &i, uint32_t c=1)
 Constructor for the SequentialVariableImpl RNG.
 SequentialVariableImpl (const SequentialVariableImpl &c)
 ~SequentialVariableImpl ()
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

uint32_t m_consecutive
double m_current
uint32_t m_currentConsecutive
RandomVariable m_increment
double m_max
double m_min

Detailed Description

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

Constructor & Destructor Documentation

ns3::SequentialVariableImpl::SequentialVariableImpl ( double  f,
double  l,
double  i = 1,
uint32_t  c = 1 
)

Constructor for the SequentialVariableImpl RNG.

The four parameters define the sequence. For example SequentialVariableImpl(0,5,1,2) creates a RNG that has the sequence 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 0, 0 ...

Parameters
fFirst value of the sequence.
lOne more than the last value of the sequence.
iIncrement between sequence values
cNumber of times each member of the sequence is repeated

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

Referenced by Copy().

+ Here is the caller graph for this function:

ns3::SequentialVariableImpl::SequentialVariableImpl ( double  f,
double  l,
const RandomVariable i,
uint32_t  c = 1 
)

Constructor for the SequentialVariableImpl RNG.

Differs from the first only in that the increment parameter is a random variable

Parameters
fFirst value of the sequence.
lOne more than the last value of the sequence.
iReference to a RandomVariableBase for the sequence increment
cNumber of times each member of the sequence is repeated

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

ns3::SequentialVariableImpl::SequentialVariableImpl ( const SequentialVariableImpl c)

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

ns3::SequentialVariableImpl::~SequentialVariableImpl ( )

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

Member Function Documentation

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

Implements ns3::RandomVariableBase.

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

References SequentialVariableImpl().

+ Here is the call graph for this function:

double ns3::SequentialVariableImpl::GetValue ( void  )
virtual
Returns
The next value in the Sequence

Implements ns3::RandomVariableBase.

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

References ns3::RandomVariable::GetValue(), m_consecutive, m_current, m_currentConsecutive, m_increment, m_max, and m_min.

+ Here is the call graph for this function:

Member Data Documentation

uint32_t ns3::SequentialVariableImpl::m_consecutive
private

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

Referenced by GetValue().

double ns3::SequentialVariableImpl::m_current
private

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

Referenced by GetValue().

uint32_t ns3::SequentialVariableImpl::m_currentConsecutive
private

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

Referenced by GetValue().

RandomVariable ns3::SequentialVariableImpl::m_increment
private

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

Referenced by GetValue().

double ns3::SequentialVariableImpl::m_max
private

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

Referenced by GetValue().

double ns3::SequentialVariableImpl::m_min
private

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

Referenced by GetValue().


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