Function solana_core::weighted_shuffle::weighted_shuffle [−][src]
pub fn weighted_shuffle<T>(weights: Vec<T>, seed: [u8; 32]) -> Vec<usize> where
T: Copy + PartialOrd + Sum + Div<T, Output = T> + FromPrimitive + ToPrimitive,
Returns a list of indexes shuffled based on the input weights
Note - The sum of all weights must not exceed u64::MAX