eDSP
0.0.1
A cross-platform DSP library written in C++.
|
This class implements a binary generator according to the discrete probability function. More...
#include <binary_generator.hpp>
Public Types | |
using | value_type = T |
Public Member Functions | |
binary_generator (value_type probability) | |
Creates a binary sequence generator. More... | |
value_type | operator() () |
Generates a boolean value according to the discrete probability function. More... | |
This class implements a binary generator according to the discrete probability function.
This function uses a Bernoulli distribution internally.
using edsp::random::binary_generator< T, Engine >::value_type = T |
|
inlineexplicit |
Creates a binary sequence generator.
probability | The p distribution parameter (probability of generating true) |
|
inline |
Generates a boolean value according to the discrete probability function.