pub fn make_base_discrete_laplace_cks20<D, QO>(
    scale: QO
) -> Fallible<Measurement<D, D::Carrier, D::InputMetric, MaxDivergence<QO>>>where
    D: DiscreteLaplaceDomain,
    D::Atom: Integer,
    (D, D::InputMetric): MetricSpace,
    QO: Float + InfCast<D::Atom>,
    Rational: TryFrom<QO>,
    Integer: From<D::Atom> + SaturatingCast<D::Atom>,
Expand description

Make a Measurement that adds noise from the discrete_laplace(scale) distribution to the input, using an efficient algorithm on rational bignums.

Set D to change the input data type and input metric:

Dinput typeD::InputMetric
AtomDomain<T> (default)TAbsoluteDistance<T>
VectorDomain<AtomDomain<T>>Vec<T>L1Distance<T>

Citations

Arguments

  • scale - Noise scale parameter for the laplace distribution. scale == sqrt(2) * standard_deviation.

Generics

  • D - Domain of the data type to be privatized. Valid values are VectorDomain<AtomDomain<T>> or AtomDomain<T>
  • QO - Data type of the output distance and scale.