Trait smartnoise_validator::components::Component[][src]

pub trait Component {
    fn propagate_property(
        &self,
        privacy_definition: &Option<PrivacyDefinition>,
        public_arguments: IndexMap<IndexKey, &Value>,
        properties: NodeProperties,
        _node_id: u32
    ) -> Result<Warnable<ValueProperties>>; }

Universal Component trait

To be a component, a struct must represent an abstract computation, for which properties can be derived about the resulting data.

Required methods

fn propagate_property(
    &self,
    privacy_definition: &Option<PrivacyDefinition>,
    public_arguments: IndexMap<IndexKey, &Value>,
    properties: NodeProperties,
    _node_id: u32
) -> Result<Warnable<ValueProperties>>
[src]

Given properties known about private arguments, and public arguments, derive properties about the resulting data.

A component must fail to propagate properties if requirements on the input properties are not met. For example, if a Component represents an abstract computation that requires prior knowledge of the number of records to be safe or function properly, the propagate_property implementation is expected to return an error state if the prior knowledge is not known.

For example, if a definition of privacy is used that is incompatible with the abstract computation, the propagate_property implementation is expected to return an error state.

Arguments

  • self - the protobuf object corresponding to the prost protobuf struct
  • privacy_definition - the definition of privacy under which the computation takes place
  • public_arguments - actual data values of arguments, typically either supplied literals or released values.
  • properties - derived properties of private input arguments
  • node_id - id of the node in the analysis graph (used to set dataset_id in the data loaders)

Returns

Derived properties on the data resulting from the abstract computation

Loading content...

Implementors

impl Component for Abs[src]

impl Component for Add[src]

impl Component for And[src]

impl Component for Cast[src]

impl Component for Clamp[src]

impl Component for ColumnBind[src]

impl Component for Component[src]

fn propagate_property(
    &self,
    privacy_definition: &Option<PrivacyDefinition>,
    public_arguments: IndexMap<IndexKey, &Value>,
    properties: NodeProperties,
    node_id: u32
) -> Result<Warnable<ValueProperties>>
[src]

Utility implementation on the component.

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

impl Component for Count[src]

impl Component for Covariance[src]

impl Component for Digitize[src]

impl Component for Divide[src]

impl Component for DpGumbelMedian[src]

impl Component for Equal[src]

impl Component for ExponentialMechanism[src]

impl Component for Filter[src]

impl Component for GaussianMechanism[src]

impl Component for GreaterThan[src]

impl Component for Histogram[src]

impl Component for Impute[src]

impl Component for Index[src]

impl Component for LaplaceMechanism[src]

impl Component for LessThan[src]

impl Component for Literal[src]

impl Component for Log[src]

impl Component for Materialize[src]

impl Component for Mean[src]

impl Component for Modulo[src]

impl Component for Multiply[src]

impl Component for Negate[src]

impl Component for Negative[src]

impl Component for Or[src]

impl Component for Partition[src]

impl Component for Power[src]

impl Component for Quantile[src]

impl Component for RawMoment[src]

impl Component for Reshape[src]

impl Component for Resize[src]

impl Component for RowMax[src]

impl Component for RowMin[src]

impl Component for SimpleGeometricMechanism[src]

impl Component for SnappingMechanism[src]

impl Component for Subtract[src]

impl Component for Sum[src]

impl Component for TheilSen[src]

impl Component for ToDataframe[src]

impl Component for Union[src]

impl Component for Variance[src]

Loading content...