Trait smartnoise_validator::components::Expandable[][src]

pub trait Expandable {
    fn expand_component(
        &self,
        privacy_definition: &Option<PrivacyDefinition>,
        component: &Component,
        public_arguments: &IndexMap<IndexKey, &Value>,
        properties: &NodeProperties,
        component_id: u32,
        maximum_id: u32
    ) -> Result<ComponentExpansion>; }

Expandable Component trait

When a component is expandable, it represents a higher order computation that may be expressed in multiple components that are more granular. Oftentimes Expandable components correspond to differentially private algorithms, that are represented in terms of an aggregation and a mechanism.

Required methods

fn expand_component(
    &self,
    privacy_definition: &Option<PrivacyDefinition>,
    component: &Component,
    public_arguments: &IndexMap<IndexKey, &Value>,
    properties: &NodeProperties,
    component_id: u32,
    maximum_id: u32
) -> Result<ComponentExpansion>
[src]

Concrete implementation for an Expandable component that returns a patch that may be applied to a computation graph.

Arguments

  • self - the protobuf object corresponding to the prost protobuf struct
  • privacy_definition - definition of privacy to use when expanding. Some expansions are not valid under some privacy definitions
  • component - contains additional metadata about the argument node ids
  • properties - properties on the data supplied as arguments
  • component_id - the id of the node to expand. The final node in the returned patch must use this id.
  • maximum_id - the starting id for which additional nodes may be added to the graph without overwriting existing nodes

Returns

Sufficient information to patch the runtime with more granular steps. More documentation at ComponentExpansion.

Loading content...

Implementors

impl Expandable for Clamp[src]

impl Expandable for Component[src]

fn expand_component(
    &self,
    privacy_definition: &Option<PrivacyDefinition>,
    component: &Component,
    public_arguments: &IndexMap<IndexKey, &Value>,
    properties: &NodeProperties,
    component_id: u32,
    maximum_id: u32
) -> Result<ComponentExpansion>
[src]

Utility implementation on the component.

This utility delegates evaluation to the concrete implementation of each component variant.

impl Expandable for Digitize[src]

impl Expandable for DpCount[src]

impl Expandable for DpCovariance[src]

impl Expandable for DpGumbelMedian[src]

impl Expandable for DpHistogram[src]

impl Expandable for DpLinearRegression[src]

impl Expandable for DpMaximum[src]

impl Expandable for DpMean[src]

fn expand_component(
    &self,
    privacy_definition: &Option<PrivacyDefinition>,
    component: &Component,
    _public_arguments: &IndexMap<IndexKey, &Value>,
    properties: &NodeProperties,
    component_id: u32,
    maximum_id: u32
) -> Result<ComponentExpansion>
[src]

Expand component

Arguments

  • &self - this
  • _privacy_definition - privacy definition from protocol buffer descriptor
  • component - component from prototypes/components.proto
  • _properties - NodeProperties
  • component_id - identifier for component from prototypes/components.proto
  • maximum_id - last ID value created for sequence, increment used to define current ID

impl Expandable for DpMedian[src]

impl Expandable for DpMinimum[src]

impl Expandable for DpQuantile[src]

impl Expandable for DpRawMoment[src]

impl Expandable for DpSum[src]

impl Expandable for DpVariance[src]

impl Expandable for ExponentialMechanism[src]

impl Expandable for GaussianMechanism[src]

impl Expandable for Histogram[src]

fn expand_component(
    &self,
    _privacy_definition: &Option<PrivacyDefinition>,
    component: &Component,
    _public_arguments: &IndexMap<IndexKey, &Value>,
    properties: &NodeProperties,
    component_id: u32,
    maximum_id: u32
) -> Result<ComponentExpansion>
[src]

If min and max are not supplied, but are known statically, then add them automatically Add nodes for clamp or digitize if categories or edges are passed

impl Expandable for Impute[src]

impl Expandable for LaplaceMechanism[src]

impl Expandable for Map[src]

impl Expandable for Maximum[src]

impl Expandable for Median[src]

impl Expandable for Minimum[src]

impl Expandable for Partition[src]

impl Expandable for Resize[src]

impl Expandable for SimpleGeometricMechanism[src]

impl Expandable for SnappingMechanism[src]

impl Expandable for ToBool[src]

impl Expandable for ToFloat[src]

impl Expandable for ToInt[src]

impl Expandable for ToString[src]

Loading content...