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. More...
 
 SequentialVariableImpl (double f, double l, const RandomVariable &i, uint32_t c=1)
 Constructor for the SequentialVariableImpl RNG. More...
 
 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 399 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 445 of file random-variable.cc.

References NS_LOG_FUNCTION.

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 456 of file random-variable.cc.

References NS_LOG_FUNCTION.

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

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

References NS_LOG_FUNCTION.

ns3::SequentialVariableImpl::~SequentialVariableImpl ( )

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

References NS_LOG_FUNCTION.

Member Function Documentation

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

Implements ns3::RandomVariableBase.

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

References NS_LOG_FUNCTION, and 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 484 of file random-variable.cc.

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

+ Here is the call graph for this function:

Member Data Documentation

uint32_t ns3::SequentialVariableImpl::m_consecutive
private

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

Referenced by GetValue().

double ns3::SequentialVariableImpl::m_current
private

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

Referenced by GetValue().

uint32_t ns3::SequentialVariableImpl::m_currentConsecutive
private

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

Referenced by GetValue().

RandomVariable ns3::SequentialVariableImpl::m_increment
private

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

Referenced by GetValue().

double ns3::SequentialVariableImpl::m_max
private

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

Referenced by GetValue().

double ns3::SequentialVariableImpl::m_min
private

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

Referenced by GetValue().


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