Return a sequential list of valuesClass SequentialVariable defines a random number generator that returns a sequential sequence. More...
#include <random-variable.h>
Inheritance diagram for ns3::SequentialVariable:
Collaboration diagram for ns3::SequentialVariable:Public Member Functions | |
| SequentialVariable (double f, double l, double i=1, uint32_t c=1) | |
| Constructor for the SequentialVariable RNG. More... | |
| SequentialVariable (double f, double l, const RandomVariable &i, uint32_t c=1) | |
| Constructor for the SequentialVariable RNG. More... | |
Public Member Functions inherited from ns3::RandomVariable | |
| RandomVariable () | |
| RandomVariable (const RandomVariable &o) | |
| ~RandomVariable () | |
| uint32_t | GetInteger (void) const |
| Returns a random integer integer from the underlying distribution. More... | |
| double | GetValue (void) const |
| Returns a random double from the underlying distribution. More... | |
| RandomVariable & | operator= (const RandomVariable &o) |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::RandomVariable | |
| RandomVariable (const RandomVariableBase &variable) | |
| RandomVariableBase * | Peek (void) const |
Return a sequential list of values
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 monotonically increasing again.
Definition at line 189 of file random-variable.h.
| 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 |
Definition at line 505 of file random-variable.cc.
References NS_LOG_FUNCTION.
| 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 |
Definition at line 510 of file random-variable.cc.
References NS_LOG_FUNCTION.