Skip to content

Commit

Permalink
non-pub epsilon
Browse files Browse the repository at this point in the history
  • Loading branch information
ooovi committed Sep 4, 2023
1 parent cfef6a7 commit d2cdd4c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/dp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<BigUint>,
epsilon: Ratio<BigUint>,
}

impl ZCdpBudget {
Expand All @@ -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 {}
Expand Down

0 comments on commit d2cdd4c

Please sign in to comment.