Skip to main content

quantile_bisect_discrete

Function quantile_bisect_discrete 

Source
fn quantile_bisect_discrete(
    p: f64,
    lo: i64,
    hi: i64,
    cdf: impl Fn(i64) -> f64,
) -> f64
Expand description

Bisection-based quantile finder for discrete distributions. Finds smallest integer x such that cdf(x) >= p, searching in [lo, hi].