Function make_geometric

Source
pub fn make_geometric<D: 'static + GeometricDomain>(
    input_domain: D,
    input_metric: D::InputMetric,
    scale: f64,
    bounds: Option<(<D::InputMetric as Metric>::Distance, <D::InputMetric as Metric>::Distance)>,
) -> Fallible<Measurement<D, D::Carrier, D::InputMetric, MaxDivergence>>
where (D, D::InputMetric): MetricSpace,
Expand description

Equivalent to make_laplace but restricted to an integer support. Can specify bounds to run the algorithm in near constant-time.

§Citations

§Arguments

  • input_domain - Domain of the data type to be privatized.
  • input_metric - Metric of the data type to be privatized.
  • scale - Noise scale parameter for the distribution. scale == standard_deviation / sqrt(2).
  • bounds - Set bounds on the count to make the algorithm run in constant-time.

§Generics

  • D - Domain of the data type to be privatized. Valid values are VectorDomain<AtomDomain<T>> or AtomDomain<T>