A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::test::RandomVariable::TestCaseBase::RngGenerator< RNG > Class Template Reference

Factory class to create new instances of a particular random variable stream. More...

+ Inheritance diagram for ns3::test::RandomVariable::TestCaseBase::RngGenerator< RNG >:
+ Collaboration diagram for ns3::test::RandomVariable::TestCaseBase::RngGenerator< RNG >:

Public Member Functions

 RngGenerator (bool anti=false)
 Constructor.
 
Ptr< RandomVariableStreamCreate () const override
 Create a new instance of a random variable stream.
 
virtual Ptr< RandomVariableStreamCreate () const =0
 Create a new instance of a random variable stream.
 

Private Attributes

bool m_anti
 Whether to create antithetic random variable streams.
 

Detailed Description

template<typename RNG>
class ns3::test::RandomVariable::TestCaseBase::RngGenerator< RNG >

Factory class to create new instances of a particular random variable stream.

Template Parameters
RNGThe type of random variable generator to create.

Definition at line 159 of file random-variable-stream-test-suite.cc.

Constructor & Destructor Documentation

◆ RngGenerator()

template<typename RNG >
ns3::test::RandomVariable::TestCaseBase::RngGenerator< RNG >::RngGenerator ( bool  anti = false)
inline

Constructor.

Parameters
[in]antiCreate antithetic streams if true.

Definition at line 166 of file random-variable-stream-test-suite.cc.

Member Function Documentation

◆ Create()

template<typename RNG >
Ptr< RandomVariableStream > ns3::test::RandomVariable::TestCaseBase::RngGenerator< RNG >::Create ( ) const
inlineoverridevirtual

Create a new instance of a random variable stream.

Returns
The new random variable stream instance.

Implements ns3::test::RandomVariable::TestCaseBase::RngGeneratorBase.

Definition at line 172 of file random-variable-stream-test-suite.cc.

References ns3::test::RandomVariable::TestCaseBase::RngGenerator< RNG >::m_anti.

Member Data Documentation

◆ m_anti

template<typename RNG >
bool ns3::test::RandomVariable::TestCaseBase::RngGenerator< RNG >::m_anti
private

Whether to create antithetic random variable streams.

Definition at line 181 of file random-variable-stream-test-suite.cc.

Referenced by ns3::test::RandomVariable::TestCaseBase::RngGenerator< RNG >::Create().


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