Function opendp::transformations::make_lipschitz_float_mul
source · pub fn make_lipschitz_float_mul<D, M>(
constant: D::Atom,
bounds: (D::Atom, D::Atom)
) -> Fallible<Transformation<D, D, M, M>>where
D: LipschitzMulFloatDomain,
M: LipschitzMulFloatMetric<Distance = D::Atom>,
(D, M): MetricSpace,
Expand description
Make a transformation that multiplies an aggregate by a constant.
The bounds clamp the input, in order to bound the increase in sensitivity from float rounding.
Arguments
constant
- The constant to multiply aggregates by.bounds
- Tuple of inclusive lower and upper bounds.
Generics
D
- Domain of the function. Must beAtomDomain<T>
orVectorDomain<AtomDomain<T>>
M
- Metric. Must beAbsoluteDistance<T>
,L1Distance<T>
orL2Distance<T>