Module smartnoise_validator::bindings[][src]

Work-in-progress shorthand interface for building differentially private analyses. Bundled with the rust validator.

The Analysis struct has impl’s for each component variant, that returns a builder object. Mandatory arguments are supplied in analysis impl, but optional arguments and evaluated values may be set via the builder. Once the component is ready to add to the analysis, call enter() on the builder to get a node id of the component.

Example

use smartnoise_validator::bindings::Analysis;
use ndarray::arr1;
let mut analysis = Analysis::new();
let lit_2 = analysis.literal().value(2.0.into()).build();
let lit_3 = analysis.literal().value(3.0.into()).build();
let _lit_5 = analysis.add(lit_2, lit_3).build();

let col_a = analysis.literal()
    .value(arr1(&[1., 2., 3.]).into_dyn().into())
    .build();
analysis.mean(col_a).build();

analysis.count(col_a).build();
println!("graph {:?}", analysis.components);
println!("release {:?}", analysis.release);

Modules

builders

Structs

Analysis