[][src]Function rand::distributions::ziggurat

fn ziggurat<R: Rng + ?Sized, P, Z>(
    rng: &mut R,
    symmetric: bool,
    x_tab: &'static [f64; 257],
    f_tab: &'static [f64; 257],
    pdf: P,
    zero_case: Z
) -> f64 where
    P: FnMut(f64) -> f64,
    Z: FnMut(&mut R, f64) -> f64

Sample a random number using the Ziggurat method (specifically the ZIGNOR variant from Doornik 2005). Most of the arguments are directly from the paper: