eDSP  0.0.1
A cross-platform DSP library written in C++.
Public Types | Public Member Functions | List of all members
edsp::random::random_generator< dist, T > Class Template Reference

This class implements a random generator according to one of the discrete probability function availables in the c++ standard. More...

#include <random_generator.hpp>

Public Types

using value_type = T
 

Public Member Functions

template<typename... Args>
 random_generator (Args... arg)
 Creates a random generator. More...
 
value_type operator() ()
 Generates a random number based in the chosen distribution. More...
 

Detailed Description

template<DistributionType dist, typename T>
class edsp::random::random_generator< dist, T >

This class implements a random generator according to one of the discrete probability function availables in the c++ standard.

See also
Distribution

Member Typedef Documentation

◆ value_type

template<DistributionType dist, typename T >
using edsp::random::random_generator< dist, T >::value_type = T

Constructor & Destructor Documentation

◆ random_generator()

template<DistributionType dist, typename T >
template<typename... Args>
edsp::random::random_generator< dist, T >::random_generator ( Args...  arg)
inlineexplicit

Creates a random generator.

Parameters
argArguments parameters to initialize the internal engine. It depends of the chosen distribution.
See also
https://en.cppreference.com/w/cpp/numeric/random

Member Function Documentation

◆ operator()()

template<DistributionType dist, typename T >
value_type edsp::random::random_generator< dist, T >::operator() ( )
inline

Generates a random number based in the chosen distribution.

Returns
The generated random number.

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