Struct opendp::core::Measurement [−][src]
pub struct Measurement<DI: Domain, DO: Domain, MI: Metric, MO: Measure> {
pub input_domain: DI,
pub output_domain: DO,
pub function: Function<DI, DO>,
pub input_metric: MI,
pub output_measure: MO,
pub privacy_relation: PrivacyRelation<MI, MO>,
}
Expand description
A randomized mechanism with certain privacy characteristics.
Fields
input_domain: DI
output_domain: DO
function: Function<DI, DO>
input_metric: MI
output_measure: MO
privacy_relation: PrivacyRelation<MI, MO>
Implementations
pub fn new(
input_domain: DI,
output_domain: DO,
function: Function<DI, DO>,
input_metric: MI,
output_measure: MO,
privacy_relation: PrivacyRelation<MI, MO>
) -> Self
Converts this Measurement into one with polymorphic output. This is useful for composition of heterogeneous Measurements.
Trait Implementations
impl<DI, DX, DO, MI, MX, MO> Shr<Measurement<DX, DO, MX, MO>> for Transformation<DI, DX, MI, MX> where
DI: 'static + Domain,
DX: 'static + Domain,
DO: 'static + Domain,
MI: 'static + Metric,
MX: 'static + Metric,
MO: 'static + Measure,
impl<DI, DX, DO, MI, MX, MO> Shr<Measurement<DX, DO, MX, MO>> for Transformation<DI, DX, MI, MX> where
DI: 'static + Domain,
DX: 'static + Domain,
DO: 'static + Domain,
MI: 'static + Metric,
MX: 'static + Metric,
MO: 'static + Measure,
type Output = Fallible<Measurement<DI, DO, MI, MO>>
type Output = Fallible<Measurement<DI, DO, MI, MO>>
The resulting type after applying the >>
operator.
Performs the >>
operation. Read more
type Output = Fallible<Measurement<DI, DO, MI, MO>>
type Output = Fallible<Measurement<DI, DO, MI, MO>>
The resulting type after applying the >>
operator.
Performs the >>
operation. Read more
Auto Trait Implementations
impl<DI, DO, MI, MO> !RefUnwindSafe for Measurement<DI, DO, MI, MO>
impl<DI, DO, MI, MO> !Send for Measurement<DI, DO, MI, MO>
impl<DI, DO, MI, MO> !Sync for Measurement<DI, DO, MI, MO>
impl<DI, DO, MI, MO> Unpin for Measurement<DI, DO, MI, MO> where
DI: Unpin,
DO: Unpin,
MI: Unpin,
MO: Unpin,
impl<DI, DO, MI, MO> !UnwindSafe for Measurement<DI, DO, MI, MO>
Blanket Implementations
Mutably borrows from an owned value. Read more
Casts the value.
Casts the value.
Casts the value.
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub unsafe fn to_subset_unchecked(&self) -> SS
pub unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.
Casts the value.
pub fn vzip(self) -> V
Casts the value.