aest 0.1.0
Collection of C++ utility libraries
Loading...
Searching...
No Matches
aest::colors::RandomBitGenerator Concept Referenceexport

A uniform random bit generator whose every output bit is random: its range is a power of two, of at least 2^24. More...

Concept definition

template<typename T>
std::uniform_random_bit_generator<T> && (T::max() - T::min() >= 0xFF'FF'FFu)
&& ((T::max() - T::min()) & (T::max() - T::min() + 1u)) == 0u
A uniform random bit generator whose every output bit is random: its range is a power of two,...
Definition Random.cppm:36

Detailed Description

A uniform random bit generator whose every output bit is random: its range is a power of two, of at least 2^24.

std::mt19937, std::mt19937_64, std::ranlux24 and std::ranlux48 qualify; std::minstd_rand does not, as its range is 2^31 - 2. Its low 24 bits make each random channel, so the results depend only on the generator's outputs and are the same on every standard library.

Template Parameters
TThe type to check

Definition at line 36 of file Random.cppm.