![]() |
Arene Base
Fundamental Utilities For Safety Critical C++
|
A distribution adaptor that discards NaN values drawn from the wrapped distribution and redraws. More...
Public Types | |
| using | result_type = typename Distribution::result_type |
| 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 | nan_rejecting_distribution () noexcept |
| Default construct adapted distribution. | |
| constexpr | nan_rejecting_distribution (Distribution dist) noexcept |
| Construct the adaptor wrapping the given distribution. | |
| template<class PRNG, class T = result_type, constraints< std::enable_if_t< std::is_floating_point< T >::value > > = nullptr> | |
| constexpr auto | operator() (PRNG &prng) const noexcept(noexcept(std::declval< Distribution const & >()(prng))) -> result_type |
| Draw a non-NaN value from the wrapped distribution; SFINAE overload for floating-point types. | |
| template<class PRNG, class T = result_type, constraints< std::enable_if_t<!std::is_floating_point< T >::value > > = nullptr> | |
| constexpr auto | operator() (PRNG &prng) const noexcept(noexcept(std::declval< Distribution const & >()(prng))) -> result_type |
| Draw a non-NaN value from the wrapped distribution; SFINAE overload for non-floating-point types. | |
A distribution adaptor that discards NaN values drawn from the wrapped distribution and redraws.
| Distribution | A distribution return floating point values |
| using arene::base::testing::nan_rejecting_distribution< Distribution >::result_type = typename Distribution::result_type |
The value type produced by this adaptor.
|
inlineconstexprnoexcept |
Default construct adapted distribution.
|
inlineexplicitconstexprnoexcept |
Construct the adaptor wrapping the given distribution.
| dist | The distribution to adapt |
|
inlineconstexprnoexcept |
Draw a non-NaN value from the wrapped distribution; SFINAE overload for floating-point types.
| PRNG | A bit generator (PRNG) type satisfying UniformRandomBitGenerator |
| prng | A bit generator (PRNG) instance |
|
inlineconstexprnoexcept |
Draw a non-NaN value from the wrapped distribution; SFINAE overload for non-floating-point types.
| PRNG | A bit generator (PRNG) type satisfying UniformRandomBitGenerator |
| prng | A bit generator (PRNG) instance |