diff --git a/README.md b/README.md index 1bc3c26..ea79e29 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ In this section the "installation" and usage of Samply.Laplace is described. To use Samply.Laplace in your project, please include the following dependency in your `Cargo.toml`: ``` -laplace_rs = {version = "0.2.0", git = "https://github.com/samply/laplace-rs.git", branch = "main"} +laplace_rs = {version = "0.6.0", git = "https://github.com/samply/laplace-rs.git", branch = "main"} ``` ### Example Usage @@ -32,13 +32,12 @@ laplace_rs = {version = "0.2.0", git = "https://github.com/samply/laplace-rs.git Using Samply.Laplace library: ```rust -use laplace_rs::{ObfCache, get_from_cache_or_privatize, Bin, ObfuscateBelow10Mode}; +use laplace_rs::{ errors::LaplaceError, ObfCache, get_from_cache_or_privatize, ObfuscateBelow10Mode}; const DELTA: f64 = 1.; const EPSILON: f64 = 0.1; -const MU: f64 = 0.; const ROUNDING_STEP: usize = 10; -const domain_limit = None; +const DOMAIN_LIMIT = None; fn obfuscate -> Result { @@ -56,7 +55,7 @@ fn obfuscate -> Result { false, // A flag indicating whether zero counts should be obfuscated. ObfuscateBelow10Mode::Ten, // 0 - return 0, 1 - return 10, 2 - obfuscate using Laplace distribution and rounding ROUNDING_STEP, // The granularity of the rounding. - domain_limit, // Optional limitation to the domain of the Laplace distributions + DOMAIN_LIMIT, // Optional limitation to the domain of the Laplace distributions &mut rng, // A secure random generator for seeded randomness. )?;