SNode.C
Loading...
Searching...
No Matches
utils::Random Class Reference

#include <Random.h>

Collaboration diagram for utils::Random:

Static Public Member Functions

static double getInRange (double ll, double ul)
 

Static Private Attributes

static std::random_device rd
 

Detailed Description

Definition at line 53 of file Random.h.

Member Function Documentation

◆ getInRange()

double utils::Random::getInRange ( double  ll,
double  ul 
)
static

Definition at line 52 of file Random.cpp.

52 {
53 static std::mt19937 gen(rd());
54
55 std::uniform_real_distribution<double> distr(static_cast<int>(ll), static_cast<int>(ul));
56
57 return distr(gen);
58 }
static std::random_device rd
Definition Random.h:58

References rd.

Referenced by core::socket::stream::SocketClient< SocketConnectorT, SocketContextFactoryT, Args >::realConnect(), and core::socket::stream::SocketServer< SocketAcceptorT, SocketContextFactoryT, Args >::realListen().

Here is the caller graph for this function:

Member Data Documentation

◆ rd

std::random_device utils::Random::rd
staticprivate

Definition at line 58 of file Random.h.

Referenced by getInRange().


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