A Discrete-Event Network Simulator Home Tutorials  ▼ Docs    ▼ Develop ▼ API
ns3::SequentialVariable Class Reference

Return a sequential list of valuesClass 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. More...

`#include <random-variable.h>`

Inheritance 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 (const RandomVariable &o)

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...

RandomVariableoperator= (const RandomVariable &o)

## Additional Inherited Members

Protected Member Functions inherited from ns3::RandomVariable
RandomVariable (const RandomVariableBase &variable)

RandomVariableBasePeek (void) const

## Detailed Description

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 187 of file random-variable.h.

## Constructor & Destructor Documentation

 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 ...

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 501 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

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

References NS_LOG_FUNCTION.

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