|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
#include <weighted_selection.hpp>
Public Member Functions | |
| constexpr | WeightedSelectionConfig (const std::array< std::pair< T, size_t >, N > &options_with_weights) |
| constexpr | WeightedSelectionConfig (std::initializer_list< std::pair< T, size_t > > options_with_weights) |
| T | select (std::mt19937_64 &rng) const |
Private Attributes | |
| std::array< std::pair< T, size_t >, N > | options_with_weights |
| size_t | total_weight = 0 |
Definition at line 8 of file weighted_selection.hpp.
|
inlineconstexpr |
Definition at line 14 of file weighted_selection.hpp.
|
inlineconstexpr |
Definition at line 22 of file weighted_selection.hpp.
|
inline |
Definition at line 33 of file weighted_selection.hpp.
|
private |
Definition at line 10 of file weighted_selection.hpp.
|
private |
Definition at line 11 of file weighted_selection.hpp.