A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::RealRandomStream Class Reference

#include <random-stream.h>

+ Inheritance diagram for ns3::RealRandomStream:
+ Collaboration diagram for ns3::RealRandomStream:

Public Member Functions

 RealRandomStream ()
 
virtual int64_t AssignStreams (int64_t stream)
 Assign a fixed random variable stream number to the random variables used by this model. More...
 
virtual uint32_t GetNext (uint32_t min, uint32_t max)
 Get integer between min and max (including min and max). More...
 
- Public Member Functions inherited from ns3::RandomStream
virtual ~RandomStream ()
 

Private Attributes

Ptr< UniformRandomVariablem_stream
 Provides uniform random variables. More...
 

Detailed Description

Definition at line 57 of file random-stream.h.

Constructor & Destructor Documentation

ns3::RealRandomStream::RealRandomStream ( )

Definition at line 32 of file random-stream.cc.

References m_stream.

Member Function Documentation

int64_t ns3::RealRandomStream::AssignStreams ( int64_t  stream)
virtual

Assign a fixed random variable stream number to the random variables used by this model.

Return the number of streams (possibly zero) that have been assigned.

Parameters
streamfirst stream index to use
Returns
the number of stream indices assigned by this model

Implements ns3::RandomStream.

Definition at line 44 of file random-stream.cc.

References m_stream, and ns3::RandomVariableStream::SetStream().

+ Here is the call graph for this function:

uint32_t ns3::RealRandomStream::GetNext ( uint32_t  min,
uint32_t  max 
)
virtual

Get integer between min and max (including min and max).

Parameters
minlower bound (inclusive)
maxupper bound (inclusive)
Returns
a random number between min and max (including min and max)

Implements ns3::RandomStream.

Definition at line 38 of file random-stream.cc.

References ns3::UniformRandomVariable::GetInteger(), and m_stream.

+ Here is the call graph for this function:

Member Data Documentation

Ptr<UniformRandomVariable> ns3::RealRandomStream::m_stream
private

Provides uniform random variables.

Definition at line 75 of file random-stream.h.

Referenced by AssignStreams(), GetNext(), and RealRandomStream().


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