22 #ifndef EDSP_WHITE_NOISE_HPP 23 #define EDSP_WHITE_NOISE_HPP 28 namespace edsp {
namespace random {
34 template <
typename T,
typename Engine = std::mt19937>
42 generator_(Engine(static_cast<std::size_t>(std::chrono::system_clock::now().time_since_epoch().count()))),
43 distribution_(std::uniform_int_distribution<T>(min, max)) {}
50 return static_cast<value_type>(distribution_(generator_));
55 std::uniform_int_distribution<T> distribution_;
60 #endif // EDSP_WHITE_NOISE_HPP constexpr meta::value_type_t< ForwardIt > max(ForwardIt first, ForwardIt last)
Computes the maximum value of the range [first, last)
Definition: max.hpp:38
This class implements a white noise generator.
Definition: white_noise_generator.hpp:35
white_noise_generator(value_type min, value_type max)
Creates a white noise sequence generator.
Definition: white_noise_generator.hpp:41
T value_type
Definition: white_noise_generator.hpp:36
value_type operator()()
Generates a random number following the noise distribution.
Definition: white_noise_generator.hpp:49
constexpr meta::value_type_t< ForwardIt > min(ForwardIt first, ForwardIt last)
Computes the minimum value of the range [first, last)
Definition: min.hpp:38
Definition: amplifier.hpp:29