![]() |
Arene Base
Fundamental Utilities For Safety Critical C++
|
A distribution adaptor producing an array by drawing each element from the wrapped distribution.
More...
Public Types | |
| using | result_type = arene::base::array<typename Distribution::result_type, N> |
| The value type produced by this adaptor. | |
Public Member Functions | |
| template<class T = Distribution, constraints< std::enable_if_t< std::is_default_constructible< T >::value > > = nullptr> | |
| constexpr | array_distribution () noexcept |
| Default construct adapted distribution. | |
| constexpr | array_distribution (Distribution dist) noexcept |
| Construct the adaptor wrapping the given distribution. | |
| template<class PRNG> | |
| auto | operator() (PRNG &prng) const noexcept(arene::base::is_nothrow_invocable_v< Distribution const &, PRNG & > &&std::is_nothrow_move_assignable< typename Distribution::result_type >::value &&std::is_nothrow_default_constructible< typename Distribution::result_type >::value &&std::is_nothrow_move_constructible< result_type >::value) -> result_type |
| Draw an array whose every element comes from an independent draw of the wrapped distribution. | |
A distribution adaptor producing an array by drawing each element from the wrapped distribution.
| Distribution | A distribution supplying the element values |
| N | The number of elements in the produced array |
Elements are drawn in ascending index order, and a given PRNG state always yields the same array.
| using arene::base::testing::array_distribution< Distribution, N >::result_type = arene::base::array<typename Distribution::result_type, N> |
The value type produced by this adaptor.
|
inlineconstexprnoexcept |
Default construct adapted distribution.
|
inlineexplicitconstexprnoexcept |
Construct the adaptor wrapping the given distribution.
| dist | The distribution to draw each element from |
|
inlinenoexcept |
Draw an array whose every element comes from an independent draw of the wrapped distribution.
| PRNG | A bit generator (PRNG) type satisfying UniformRandomBitGenerator |
| prng | A bit generator (PRNG) instance |
N values drawn from the wrapped distribution