Struct opendp::core::Transformation [−][src]
pub struct Transformation<DI: Domain, DO: Domain, MI: Metric, MO: Metric> { pub input_domain: DI, pub output_domain: DO, pub function: Function<DI, DO>, pub input_metric: MI, pub output_metric: MO, pub stability_relation: StabilityRelation<MI, MO>, }
Expand description
A data transformation with certain stability characteristics.
Fields
input_domain: DI
output_domain: DO
function: Function<DI, DO>
input_metric: MI
output_metric: MO
stability_relation: StabilityRelation<MI, MO>
Implementations
pub fn new(
input_domain: DI,
output_domain: DO,
function: Function<DI, DO>,
input_metric: MI,
output_metric: MO,
stability_relation: StabilityRelation<MI, MO>
) -> Self
Converts this Transformation into one with polymorphic output. It’s not clear if we’ll need this, but it’s provided for symmetry with Measurement.
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
impl<DI, DX, DO, MI, MX, MO> Shr<Transformation<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 + Metric,
impl<DI, DX, DO, MI, MX, MO> Shr<Transformation<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 + Metric,
type Output = Fallible<Transformation<DI, DO, MI, MO>>
type Output = Fallible<Transformation<DI, DO, MI, MO>>
The resulting type after applying the >>
operator.
Performs the >>
operation. Read more
type Output = Fallible<Transformation<DI, DO, MI, MO>>
type Output = Fallible<Transformation<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 Transformation<DI, DO, MI, MO>
impl<DI, DO, MI, MO> !Send for Transformation<DI, DO, MI, MO>
impl<DI, DO, MI, MO> !Sync for Transformation<DI, DO, MI, MO>
impl<DI, DO, MI, MO> Unpin for Transformation<DI, DO, MI, MO> where
DI: Unpin,
DO: Unpin,
MI: Unpin,
MO: Unpin,
impl<DI, DO, MI, MO> !UnwindSafe for Transformation<DI, DO, MI, MO>
Blanket Implementations
Mutably borrows from an owned value. Read more
Casts the value.
Casts the value.
type Output = T
type Output = T
Should always be Self
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.