Skip to main content

sample_beta

Function sample_beta 

Source
pub fn sample_beta(a: u32, b: u32, seed: u64) -> f64
Expand description

A Beta(a, b) draw for integer a, b ≥ 1: X / (X + Y) with X ~ Gamma(a), Y ~ Gamma(b), each a sum of exponentials. Counts above 1000 are scaled down to keep the cost bounded (the shape barely moves).