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 RandomVariableBase * | Copy (void) const |
Private Attributes | |
double | m_min |
double | m_max |
RandomVariable | m_increment |
uint32_t | m_consecutive |
double | m_current |
uint32_t | m_currentConsecutive |
Definition at line 499 of file random-variable.cc.
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 ...
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
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.
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] |
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.
uint32_t ns3::SequentialVariableImpl::m_consecutive [private] |
Definition at line 539 of file random-variable.cc.
Referenced by GetValue().
double ns3::SequentialVariableImpl::m_current [private] |
Definition at line 540 of file random-variable.cc.
Referenced by GetValue().
uint32_t ns3::SequentialVariableImpl::m_currentConsecutive [private] |
Definition at line 541 of file random-variable.cc.
Referenced by GetValue().
Definition at line 538 of file random-variable.cc.
Referenced by GetValue().
double ns3::SequentialVariableImpl::m_max [private] |
Definition at line 537 of file random-variable.cc.
Referenced by GetValue().
double ns3::SequentialVariableImpl::m_min [private] |
Definition at line 536 of file random-variable.cc.
Referenced by GetValue().