Class SequentialVariable defines a random number generator that returns a sequential sequence. The sequence monotonically increases for a period, then wraps around to the low value and begins monotonicaly increasing again. More...
#include <random-variable.h>
Public Member Functions | |
SequentialVariable (double f, double l, double i=1, uint32_t c=1) | |
Constructor for the SequentialVariable RNG. | |
SequentialVariable (double f, double l, const RandomVariable &i, uint32_t c=1) | |
Constructor for the SequentialVariable RNG. |
Class SequentialVariable defines a random number generator that returns a sequential sequence. The sequence monotonically increases for a period, then wraps around to the low value and begins monotonicaly increasing again.
ns3::SequentialVariable::SequentialVariable | ( | double | f, | |
double | l, | |||
double | i = 1 , |
|||
uint32_t | c = 1 | |||
) |
Constructor for the SequentialVariable RNG.
The four parameters define the sequence. For example SequentialVariable(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 |
ns3::SequentialVariable::SequentialVariable | ( | double | f, | |
double | l, | |||
const RandomVariable & | i, | |||
uint32_t | c = 1 | |||
) |
Constructor for the SequentialVariable 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 RandomVariable for the sequence increment | |
c | Number of times each member of the sequence is repeated |