Module solana_gossip::weighted_shuffle [−][src]
Expand description
The weighted_shuffle
module provides an iterator over shuffled weights.
Structs
Implements an iterator where indices are shuffled according to their weights:
Enums
Functions
Returns the highest index after computing a weighted shuffle. Saves doing any sorting for O(n) max calculation.
Returns a list of indexes shuffled based on the input weights
Note - The sum of all weights must not exceed u64::MAX