Trait smartnoise_validator::components::Expandable [−][src]
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]
&self,
privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
public_arguments: &IndexMap<IndexKey, &Value>,
properties: &NodeProperties,
component_id: u32,
maximum_id: u32
) -> Result<ComponentExpansion>
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 structprivacy_definition
- definition of privacy to use when expanding. Some expansions are not valid under some privacy definitionscomponent
- contains additional metadata about the argument node idsproperties
- properties on the data supplied as argumentscomponent_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.
Implementors
impl Expandable for Clamp
[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]
&self,
_privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
properties: &NodeProperties,
component_id: u32,
maximum_id: u32
) -> Result<ComponentExpansion>
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]
&self,
privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
public_arguments: &IndexMap<IndexKey, &Value>,
properties: &NodeProperties,
component_id: u32,
maximum_id: u32
) -> Result<ComponentExpansion>
Utility implementation on the component.
This utility delegates evaluation to the concrete implementation of each component variant.
impl Expandable for Digitize
[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]
&self,
_privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
properties: &NodeProperties,
component_id: u32,
maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for DpCount
[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]
&self,
privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
properties: &NodeProperties,
component_id: u32,
maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for DpCovariance
[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]
&self,
privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
properties: &NodeProperties,
component_id: u32,
maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for DpGumbelMedian
[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]
&self,
privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
properties: &NodeProperties,
component_id: u32,
_maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for DpHistogram
[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]
&self,
privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
properties: &NodeProperties,
component_id: u32,
maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for DpLinearRegression
[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]
&self,
_privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
public_arguments: &IndexMap<IndexKey, &Value>,
_properties: &NodeProperties,
component_id: u32,
maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for DpMaximum
[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]
&self,
_privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
_properties: &NodeProperties,
component_id: u32,
_maximum_id: u32
) -> Result<ComponentExpansion>
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]
&self,
privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
properties: &NodeProperties,
component_id: u32,
maximum_id: u32
) -> Result<ComponentExpansion>
Expand component
Arguments
&self
- this_privacy_definition
- privacy definition from protocol buffer descriptorcomponent
- component from prototypes/components.proto_properties
- NodePropertiescomponent_id
- identifier for component from prototypes/components.protomaximum_id
- last ID value created for sequence, increment used to define current ID
impl Expandable for DpMedian
[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]
&self,
_privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
properties: &NodeProperties,
component_id: u32,
_maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for DpMinimum
[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]
&self,
_privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
_properties: &NodeProperties,
component_id: u32,
_maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for DpQuantile
[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]
&self,
privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
properties: &NodeProperties,
component_id: u32,
maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for DpRawMoment
[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]
&self,
privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
_properties: &NodeProperties,
component_id: u32,
maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for DpSum
[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]
&self,
privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
properties: &NodeProperties,
component_id: u32,
maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for DpVariance
[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]
&self,
privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
_properties: &NodeProperties,
component_id: u32,
maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for ExponentialMechanism
[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]
&self,
privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
properties: &NodeProperties,
component_id: u32,
maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for GaussianMechanism
[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]
&self,
privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
properties: &NodeProperties,
component_id: u32,
maximum_id: u32
) -> Result<ComponentExpansion>
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]
&self,
_privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
properties: &NodeProperties,
component_id: u32,
maximum_id: u32
) -> Result<ComponentExpansion>
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]
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]
&self,
_privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
properties: &NodeProperties,
component_id: u32,
maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for LaplaceMechanism
[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]
&self,
privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
properties: &NodeProperties,
component_id: u32,
maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for Map
[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]
&self,
_privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
public_arguments: &IndexMap<IndexKey, &Value>,
properties: &NodeProperties,
component_id: u32,
maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for Maximum
[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]
&self,
_privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
_properties: &NodeProperties,
component_id: u32,
_maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for Median
[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]
&self,
_privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
_properties: &NodeProperties,
component_id: u32,
_maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for Minimum
[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]
&self,
_privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
_properties: &NodeProperties,
component_id: u32,
_maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for Partition
[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]
&self,
_privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
properties: &NodeProperties,
component_id: u32,
maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for Resize
[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]
&self,
_privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
properties: &NodeProperties,
component_id: u32,
maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for SimpleGeometricMechanism
[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]
&self,
privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
public_arguments: &IndexMap<IndexKey, &Value>,
properties: &NodeProperties,
component_id: u32,
maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for SnappingMechanism
[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]
&self,
privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
properties: &NodeProperties,
component_id: u32,
maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for ToBool
[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]
&self,
_privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
_properties: &NodeProperties,
component_id: u32,
_maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for ToFloat
[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]
&self,
_privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
_properties: &NodeProperties,
component_id: u32,
_maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for ToInt
[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]
&self,
_privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
_properties: &NodeProperties,
component_id: u32,
_maximum_id: u32
) -> Result<ComponentExpansion>
impl Expandable for ToString
[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]
&self,
_privacy_definition: &Option<PrivacyDefinition>,
component: &Component,
_public_arguments: &IndexMap<IndexKey, &Value>,
_properties: &NodeProperties,
component_id: u32,
_maximum_id: u32
) -> Result<ComponentExpansion>