Function smartnoise_runtime::utilities::noise::sample_geometric_censored[][src]

pub fn sample_geometric_censored(
    prob: f64,
    max_trials: i64,
    enforce_constant_time: bool
) -> Result<i64>

Sample from the censored geometric distribution with parameter “prob” and maximum number of trials “max_trials”.

Arguments

Return

A draw from the censored geometric distribution.

Example

use smartnoise_runtime::utilities::noise::sample_geometric_censored;
let geom = sample_geometric_censored(0.1, 20, false);