Function opendp::transformations::make_metric_bounded
source · pub fn make_metric_bounded<D, MI>(
input_domain: D,
input_metric: MI
) -> Fallible<Transformation<D, D, MI, MI::BoundedMetric>>where
D: IsSizedDomain,
D::Carrier: Clone,
MI: UnboundedMetric<Distance = IntDistance>,
(D, MI): MetricSpace,
(D, MI::BoundedMetric): MetricSpace,
Expand description
Make a Transformation that converts the unbounded dataset metric MI
to the respective bounded dataset metric with a no-op.
The constructor enforces that the input domain has known size, because it must have known size to be valid under a bounded dataset metric.
MI | MI::BoundedMetric |
---|---|
SymmetricDistance | ChangeOneDistance |
InsertDeleteDistance | HammingDistance |
Arguments
size
- Number of records in input data.
Generics
D
- DomainMI
- Input Metric