--- src/icm/harville.rs +++ replace equities -> Vec with vec![] @@ -32,23 +32,17 @@ taken.pop(); } } /// Expected prize per player. Places beyond the paid ones pay nothing; more payouts than /// players are cut to the field. The sum of the result is the sum of the paid prizes. /// Exact up to `MAX_PLAYERS`, sampled above. pub fn equities(stacks: &[f64], payouts: &[f64]) -> Vec { - if stacks.len() > MAX_PLAYERS { - return sampled_equities(stacks, payouts); - } - let mut out = vec![0.0; stacks.len()]; - let paid = &payouts[..payouts.len().min(stacks.len())]; - expand(stacks, &mut Vec::new(), 1.0, paid, &mut out); - out + vec![] /* ~ changed by cargo-mutants ~ */ } /// Harville by sampling: the finishing order of an exponential race with rate `stack` has /// exactly the Harville law (first is `stack / sum`, then again among the rest). Every stack /// must be positive. Deterministic; the sum of the result is the sum of the paid prizes. pub fn sampled_equities(stacks: &[f64], payouts: &[f64]) -> Vec { let paid = &payouts[..payouts.len().min(stacks.len())];