Skip to main content

make_sized_bounded_float_ordered_sum

Function make_sized_bounded_float_ordered_sum 

Source
pub fn make_sized_bounded_float_ordered_sum<S>(
    size: usize,
    bounds: (S::Item, S::Item),
) -> Fallible<Transformation<VectorDomain<AtomDomain<S::Item>>, InsertDeleteDistance, AtomDomain<S::Item>, AbsoluteDistance<S::Item>>>
where S: SaturatingSum, S::Item: 'static + Float,
Expand description

Make a Transformation that computes the sum of bounded floats with known ordering and dataset size.

Only useful when make_bounded_float_checked_sum returns an error due to potential for overflow. This uses a restricted-sensitivity proof that takes advantage of known dataset size for better utility. You may need to use make_ordered_random to impose an ordering on the data.

S (summation algorithm)input type
Sequential<S::Item>Vec<S::Item>
Pairwise<S::Item>Vec<S::Item>

S::Item is the type of all of the following: each bound, each element in the input data, the output data, and the output sensitivity.

For example, to construct a transformation that pairwise-sums f32 half-precision floats, set S to Pairwise<f32>.

§Citations

§Arguments

  • size - Number of records in input data.
  • bounds - Tuple of lower and upper bounds for data in the input domain.

§Generics

  • S - Summation algorithm to use over some data type T (T is shorthand for S::Item)