11#ifndef SLMADSP_RANDOM_H
12#define SLMADSP_RANDOM_H
29 template <RandomEngineType Engine>
42 auto setSeed(std::seed_seq seedSequence) -> void;
55 template <NumericType T>
57 Distribution<T> distribution{ range.min, range.max };
58 const auto res = distribution(m_rng);
65 using Distribution = std::conditional_t<std::is_floating_point_v<T>,
66 std::uniform_real_distribution<T>,
67 std::uniform_int_distribution<T>>;
A class for (pseudo) random number generation.
Definition marvin_Random.h:30
auto setSeed(int seed) -> void
T generate(Range< T > range) noexcept
Definition marvin_Random.h:56
auto setSeed(std::seed_seq seedSequence) -> void
RandomGenerator(std::random_device &rd)
Utility helper functions and classes.
Definition marvin_Utils.h:21
RandomGenerator< std::mt19937 > Random
Definition marvin_Random.h:72
POD type that represents a range of values, for classes requiring a min and a max.
Definition marvin_Range.h:21