Function smartnoise_runtime::utilities::mechanisms::simple_geometric_mechanism[][src]

pub fn simple_geometric_mechanism(
    value: i64,
    epsilon: f64,
    sensitivity: f64,
    min: i64,
    max: i64,
    enforce_constant_time: bool
) -> Result<i64>

Returns noise drawn according to the Geometric mechanism.

Uses the Geometric mechanism as originally proposed in Ghosh, Roughgarden, & Sundarajan (2012). We are calling this the simple_geometric_mechanism because there is some hope that we will later add other versions, such as those developed in Balcer & Vadhan (2019)

Arguments

Return

A draw according to the Geometric mechanism.

Examples

use smartnoise_runtime::utilities::mechanisms::simple_geometric_mechanism;
let n = simple_geometric_mechanism(4, 0.1, 1., 0, 10, true);