Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
Data Structures | Static Public Member Functions | Static Public Attributes
ext::random_devices Class Reference

Definition of randomness sources. Provided sources are c++ builtin random_device and own semirandom_device. The random device is the best randomness source but its generation is slow. Semirandom device is good enough and it provices random values fast. Given a seed the semirandom device can also provide reproducible sequence any number of times. More...

#include <random.hpp>

Collaboration diagram for ext::random_devices:
[legend]

Static Public Member Functions

static std::random_device & getRandom ()
 Getter of the singleton random device. More...
 
static semirandom_device & getSemirandom ()
 Getter of the singleton semirandom device. More...
 

Static Public Attributes

static std::random_device & random = getRandom ( )
 The reference to singleton random device. More...
 
static semirandom_device & semirandom = getSemirandom ( )
 The reference to singleton semirandom device. More...
 

Detailed Description

Definition of randomness sources. Provided sources are c++ builtin random_device and own semirandom_device. The random device is the best randomness source but its generation is slow. Semirandom device is good enough and it provices random values fast. Given a seed the semirandom device can also provide reproducible sequence any number of times.

Member Function Documentation

◆ getRandom()

static std::random_device & ext::random_devices::getRandom ( )
inlinestatic

Getter of the singleton random device.

Returns
instance of the random device
Here is the caller graph for this function:

◆ getSemirandom()

static semirandom_device & ext::random_devices::getSemirandom ( )
inlinestatic

Getter of the singleton semirandom device.

Returns
instance of the semirandom device
Here is the caller graph for this function:

Field Documentation

◆ random

std::random_device & ext::random_devices::random = getRandom ( )
static

The reference to singleton random device.

◆ semirandom

random_devices::semirandom_device & ext::random_devices::semirandom = getSemirandom ( )
static

The reference to singleton semirandom device.


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