AntHocNet 2.0.0
Paper-faithful ant-colony ad hoc routing: the shared core and its adapters
Loading...
Searching...
No Matches
anthocnet::core::IRng Class Referenceabstract

Source of randomness. More...

#include <anthocnet/core/ports.h>

Inheritance diagram for anthocnet::core::IRng:
ahn_web::Node ns3::anthocnet::Ns3Rng

Public Member Functions

virtual ~IRng ()=default
 
virtual double uniform ()=0
 Uniform double in [0, 1).
 
virtual int uniformInt (int n)=0
 Uniform integer in [0, n). Caller guarantees n > 0.
 

Detailed Description

Source of randomness.

All algorithm randomness routes through this so runs are reproducible from the adapter's RNG stream (the original code called the libc rand() directly).

Definition at line 33 of file ports.h.

Constructor & Destructor Documentation

◆ ~IRng()

virtual anthocnet::core::IRng::~IRng ( )
virtualdefault

Member Function Documentation

◆ uniform()

virtual double anthocnet::core::IRng::uniform ( )
pure virtual

Uniform double in [0, 1).

Implemented in ns3::anthocnet::Ns3Rng, and ahn_web::Node.

◆ uniformInt()

virtual int anthocnet::core::IRng::uniformInt ( int  n)
pure virtual

Uniform integer in [0, n). Caller guarantees n > 0.

Implemented in ns3::anthocnet::Ns3Rng, and ahn_web::Node.


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