template<typename T, typename PrType = value_t>
class probfd::ItemProbabilityPair< T, PrType >
An item-probability pair.
|
| ItemProbabilityPair ()=default |
| Pairs a default-constructed item with an indeterminate probability.
|
|
template<typename A , typename B >
requires (std::is_constructible_v<T, A> && std::is_constructible_v<PrType, B>) |
| explicit (!std::is_convertible_v< T, A >||!std::is_convertible_v< PrType, B >) ItemProbabilityPair(A &&item |
| Pairs a given item with a given probability.
|
|
template<typename... Args, typename... Args2> |
| ItemProbabilityPair (std::piecewise_construct_t, std::tuple< Args... > t1, std::tuple< Args2... > t2) |
| Pairs an item constructed from a tuple of constructor arguments with a given probability.
|
|
template<typename T , typename PrType = value_t>
template<typename A , typename B >
requires (std::is_constructible_v<T, A> && std::is_constructible_v<PrType, B>)
Pairs a given item with a given probability.