diff --git a/src/dp.rs b/src/dp.rs index d8bfd6d4a..23bc74250 100644 --- a/src/dp.rs +++ b/src/dp.rs @@ -113,7 +113,7 @@ pub trait DifferentialPrivacyDistribution {} /// [BS16]: https://arxiv.org/pdf/1605.02065.pdf #[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] pub struct ZCdpBudget { - pub epsilon: Ratio, + epsilon: Ratio, } impl ZCdpBudget { @@ -124,6 +124,11 @@ impl ZCdpBudget { pub fn new(epsilon: Rational) -> Self { Self { epsilon: epsilon.0 } } + + /// Return the `epsilon` parameter of this strategy. + pub fn get_epsilon(&self) -> Rational { + Rational(self.epsilon.clone()) + } } impl DifferentialPrivacyBudget for ZCdpBudget {}