ns3::SequentialVariableImpl Class Reference

Inheritance diagram for ns3::SequentialVariableImpl:
Inheritance graph
[legend]
Collaboration diagram for ns3::SequentialVariableImpl:
Collaboration graph
[legend]

List of all members.

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 double GetValue ()
virtual RandomVariableBaseCopy (void) const

Private Attributes

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

Detailed Description

Definition at line 499 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:
f First value of the sequence.
l One more than the last value of the sequence.
i Increment between sequence values
c Number of times each member of the sequence is repeated

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

Referenced by Copy().

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:
f First value of the sequence.
l One more than the last value of the sequence.
i Reference to a RandomVariableBase for the sequence increment
c Number of times each member of the sequence is repeated

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

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

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

ns3::SequentialVariableImpl::~SequentialVariableImpl (  ) 

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


Member Function Documentation

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

Implements ns3::RandomVariableBase.

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

References SequentialVariableImpl().

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

Implements ns3::RandomVariableBase.

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

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


Member Data Documentation

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

Referenced by GetValue().

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

Referenced by GetValue().

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

Referenced by GetValue().

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

Referenced by GetValue().

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

Referenced by GetValue().

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

Referenced by GetValue().


The documentation for this class was generated from the following file:
Generated on Thu Dec 3 14:10:26 2009 for NS-3 by  doxygen 1.6.3