pub fn make_randomized_response_bool<QO>(
prob: QO,
constant_time: bool
) -> Fallible<Measurement<AtomDomain<bool>, bool, DiscreteDistance, MaxDivergence<QO>>>where
bool: SampleBernoulli<QO>,
QO: Float,
(AtomDomain<bool>, DiscreteDistance): MetricSpace,
Expand description
Make a Measurement that implements randomized response on a boolean value.
prob
- Probability of returning the correct answer. Must be in [0.5, 1)
constant_time
- Set to true to enable constant time. Slower.
QO
- Data type of probability and output distance.