Function solana_core::weighted_shuffle::weighted_best [−][src]
pub fn weighted_best(
weights_and_indexes: &[(u64, usize)],
seed: [u8; 32]
) -> usize
Returns the highest index after computing a weighted shuffle. Saves doing any sorting for O(n) max calculation.