Trait smartnoise_validator::components::Mechanism [−][src]
Mechanism component trait
When a component is a Mechanism, it consumes a privacy budget.
Required methods
fn get_privacy_usage(
&self,
privacy_definition: &PrivacyDefinition,
release_usage: Option<&Vec<PrivacyUsage>>,
properties: &NodeProperties
) -> Result<Option<Vec<PrivacyUsage>>>
[src]
&self,
privacy_definition: &PrivacyDefinition,
release_usage: Option<&Vec<PrivacyUsage>>,
properties: &NodeProperties
) -> Result<Option<Vec<PrivacyUsage>>>
Extraction of privacy usage by the component.
By default, this returns the upper bound of the privacy usage of the component.
If the component has been evaluated, it is possible the actual usage of the component differs from the upper bound. In this case, the release_usage is returned.
Arguments
self
- the protobuf object corresponding to the prost protobuf struct, containing an upper bound on privacy usageprivacy_definition
- the definition of privacy under which the sensitivity is to be computedrelease_usage
- optionally, the privacy actually used by the mechanism (if it has already been released)sensitivity_type
- space for which the sensitivity is computed within
Returns
Privacy usages after group_size, c_stability and privacy amplification have been taken into account.
Implementors
impl Mechanism for Component
[src]
fn get_privacy_usage(
&self,
privacy_definition: &PrivacyDefinition,
release_usage: Option<&Vec<PrivacyUsage>>,
properties: &NodeProperties
) -> Result<Option<Vec<PrivacyUsage>>>
[src]
&self,
privacy_definition: &PrivacyDefinition,
release_usage: Option<&Vec<PrivacyUsage>>,
properties: &NodeProperties
) -> Result<Option<Vec<PrivacyUsage>>>
impl Mechanism for ExponentialMechanism
[src]
fn get_privacy_usage(
&self,
privacy_definition: &PrivacyDefinition,
release_usage: Option<&Vec<PrivacyUsage>>,
properties: &NodeProperties
) -> Result<Option<Vec<PrivacyUsage>>>
[src]
&self,
privacy_definition: &PrivacyDefinition,
release_usage: Option<&Vec<PrivacyUsage>>,
properties: &NodeProperties
) -> Result<Option<Vec<PrivacyUsage>>>
impl Mechanism for GaussianMechanism
[src]
fn get_privacy_usage(
&self,
privacy_definition: &PrivacyDefinition,
release_usage: Option<&Vec<PrivacyUsage>>,
properties: &NodeProperties
) -> Result<Option<Vec<PrivacyUsage>>>
[src]
&self,
privacy_definition: &PrivacyDefinition,
release_usage: Option<&Vec<PrivacyUsage>>,
properties: &NodeProperties
) -> Result<Option<Vec<PrivacyUsage>>>
impl Mechanism for LaplaceMechanism
[src]
fn get_privacy_usage(
&self,
privacy_definition: &PrivacyDefinition,
release_usage: Option<&Vec<PrivacyUsage>>,
properties: &NodeProperties
) -> Result<Option<Vec<PrivacyUsage>>>
[src]
&self,
privacy_definition: &PrivacyDefinition,
release_usage: Option<&Vec<PrivacyUsage>>,
properties: &NodeProperties
) -> Result<Option<Vec<PrivacyUsage>>>
impl Mechanism for SimpleGeometricMechanism
[src]
fn get_privacy_usage(
&self,
privacy_definition: &PrivacyDefinition,
release_usage: Option<&Vec<PrivacyUsage>>,
properties: &NodeProperties
) -> Result<Option<Vec<PrivacyUsage>>>
[src]
&self,
privacy_definition: &PrivacyDefinition,
release_usage: Option<&Vec<PrivacyUsage>>,
properties: &NodeProperties
) -> Result<Option<Vec<PrivacyUsage>>>
impl Mechanism for SnappingMechanism
[src]
fn get_privacy_usage(
&self,
privacy_definition: &PrivacyDefinition,
release_usage: Option<&Vec<PrivacyUsage>>,
properties: &NodeProperties
) -> Result<Option<Vec<PrivacyUsage>>>
[src]
&self,
privacy_definition: &PrivacyDefinition,
release_usage: Option<&Vec<PrivacyUsage>>,
properties: &NodeProperties
) -> Result<Option<Vec<PrivacyUsage>>>