|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
Classes | |
| class | SplitMix64Engine |
| Implementation of the SplitMix64 pseudorandom number generator that provides the API required for a standard uniform random bit generator, so that it can be plugged into any of the random number distributions provided by the standard library. More... | |
| class | Xoroshiro128PlusPlusEngine |
| Implementation of the xoroshiro128++ pseudorandom number generator that provides the API required for a standard uniform random bit generator, so that it can be plugged into any of the random number distributions provided by the standard library. More... | |
Typedefs | |
| using | NonDeterministicRandomEngine = std::random_device |
| Uniformly-destributed random number generator that provides non-deterministic random numbers if supported by the host system. | |
| using | DefaultRandomEngine = Xoroshiro128PlusPlusEngine |
| Default pseudorandom number generator. | |
| template<typename Integer> | |
| using | UniformIntegerDistribution = std::uniform_int_distribution<Integer> |
| Random number distribution that produces integer values uniformly distributed on the closed interval [a, b]. | |
| template<typename Float> | |
| using | UniformRealDistribution = std::uniform_real_distribution<Float> |
| Random number distribution that produces floating-point values uniformly distributed on the half-open interval [a, b). | |
| using | BernoulliDistribution = std::bernoulli_distribution |
| Random number distribution that produces boolean values with probability p of being true. | |
| template<typename Integer> | |
| using | BinomialDistribution = std::binomial_distribution<Integer> |
| Random number distribution that produces non-negative integer values that correspond to the number of true values in a sequence of t boolean tests, each with probability p of being true. | |
| template<typename Integer> | |
| using | NegativeBinomialDistribution = std::negative_binomial_distribution<Integer> |
| Random number distribution that produces non-negative integer values that correspond to the number of false values before exactly k true values occur in a sequence of boolean tests, each with probability p of being true. | |
| template<typename Integer> | |
| using | GeometricDistribution = std::geometric_distribution<Integer> |
| Random number distribution that produces non-negative integer values that correspond to the number of false values before a true value occurs in a sequence of boolean tests, each with probability p of being true. | |
| template<typename Integer> | |
| using | PoissonDistribution = std::poisson_distribution<Integer> |
| Random number distribution that produces non-negative integer values that correspond to the number of occurences of a random event where the expected average number of occurences is μ in the same interval under the same conditions. | |
| template<typename Float> | |
| using | ExponentialDistribution = std::exponential_distribution<Float> |
| Random number distribution that produces non-negative floating-point values that correspond to the time/distance until the next random event if random events occur at a constant average rate λ per unit of time/distance. | |
| template<typename Float> | |
| using | NormalDistribution = std::normal_distribution<Float> |
| Random number distribution that produces floating-point values according to a Normal/Gaussian distribution with mean μ and standard deviation σ. | |
| template<typename Integer> | |
| using | DiscreteDistribution = std::discrete_distribution<Integer> |
| Random number distribution that, given a list of weights w, produces integer values in the interval [0, w.size() - 1] with each integer i having probability w[i] / sum(w) of being selected. | |
Functions | |
| template<floating_point T, size_t EntropyBits = std::numeric_limits<T>::digits> | |
| T | generateCanonical (auto &generator) |
| Generate a random floating-point number uniformly distributed on the half-open interval [0, 1). | |
| using grem::randomness::NonDeterministicRandomEngine = std::random_device |
Uniformly-destributed random number generator that provides non-deterministic random numbers if supported by the host system.
Default pseudorandom number generator.
| using grem::randomness::UniformIntegerDistribution = std::uniform_int_distribution<Integer> |
Random number distribution that produces integer values uniformly distributed on the closed interval [a, b].
| Integer | integer type to generate. Must be one of the following types:
|
| using grem::randomness::UniformRealDistribution = std::uniform_real_distribution<Float> |
Random number distribution that produces floating-point values uniformly distributed on the half-open interval [a, b).
| Float | floating-point type to generate. Must be one of the following types:
|
| using grem::randomness::BernoulliDistribution = std::bernoulli_distribution |
Random number distribution that produces boolean values with probability p of being true.
| using grem::randomness::BinomialDistribution = std::binomial_distribution<Integer> |
Random number distribution that produces non-negative integer values that correspond to the number of true values in a sequence of t boolean tests, each with probability p of being true.
| Integer | integer type to generate. Must be one of the following types:
|
| using grem::randomness::NegativeBinomialDistribution = std::negative_binomial_distribution<Integer> |
Random number distribution that produces non-negative integer values that correspond to the number of false values before exactly k true values occur in a sequence of boolean tests, each with probability p of being true.
| Integer | integer type to generate. Must be one of the following types:
|
| using grem::randomness::GeometricDistribution = std::geometric_distribution<Integer> |
Random number distribution that produces non-negative integer values that correspond to the number of false values before a true value occurs in a sequence of boolean tests, each with probability p of being true.
This distribution is equivalent to NegativeBinomialDistribution with k = 1, and is the integer counterpart of ExponentialDistribution.
| Integer | integer type to generate. Must be one of the following types:
|
| using grem::randomness::PoissonDistribution = std::poisson_distribution<Integer> |
Random number distribution that produces non-negative integer values that correspond to the number of occurences of a random event where the expected average number of occurences is μ in the same interval under the same conditions.
| Integer | integer type to generate. Must be one of the following types:
|
| using grem::randomness::ExponentialDistribution = std::exponential_distribution<Float> |
Random number distribution that produces non-negative floating-point values that correspond to the time/distance until the next random event if random events occur at a constant average rate λ per unit of time/distance.
This distribution is the floating-point counterpart of GeometricDistribution.
| Float | floating-point type to generate. Must be one of the following types:
|
| using grem::randomness::NormalDistribution = std::normal_distribution<Float> |
Random number distribution that produces floating-point values according to a Normal/Gaussian distribution with mean μ and standard deviation σ.
| Float | floating-point type to generate. Must be one of the following types:
|
| using grem::randomness::DiscreteDistribution = std::discrete_distribution<Integer> |
Random number distribution that, given a list of weights w, produces integer values in the interval [0, w.size() - 1] with each integer i having probability w[i] / sum(w) of being selected.
| Integer | integer type to generate. Must be one of the following types:
|
|
inlinenodiscard |
Generate a random floating-point number uniformly distributed on the half-open interval [0, 1).
| T | floating-point number type to generate. |
| EntropyBits | number of bits of entropy to acquire when generating the result. |
| generator | uniform random bit generator to acquire entropy from. |