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

pub fn sample_laplace(
    shift: f64,
    scale: f64,
    enforce_constant_time: bool
) -> Result<f64>

Sample from Laplace distribution centered at shift and scaled by scale.

Arguments

Return

Draw from Laplace(shift, scale).

Example

use smartnoise_runtime::utilities::noise::sample_laplace;
let n = sample_laplace(0.0, 2.0, false);