SampleParams

Struct SampleParams 

Source
pub struct SampleParams {
    pub input_seeds: Vec<usize>,
    pub generate_params: GenerateParams,
    pub demand: usize,
    pub validate_output: bool,
    pub change_batch_size: usize,
    pub reflect_trace: bool,
    pub reflect_dcg: bool,
}
Expand description

Parameters for collecting a single sample. In addition to these parameters, the experiment maintains a Rng based on the input_seeds, below; this Rng is given to Edit::edit to generate psuedo-random edits, in batches. For each engine, this Rng is sequenced across successive samples. Given an input_seeds vector, there is one unique Rng sequence for each engine’s sequence of samples.

Fields§

§input_seeds: Vec<usize>

We convert this seed into a random-number-generator before generating and editing.

§generate_params: GenerateParams

Other parameters for generating the input.

§demand: usize

demand: For lazy algorithms, the number of output elements to force, e.g., by producing a vector of output data. Eager algorithms ignore this parameter (they always produce all of their output).

§validate_output: bool

Whether to validate the output after each computation using the naive and DCG engines

§change_batch_size: usize

Size of each batch of changes.

§reflect_trace: bool

Reflect the trace (See adapton::engine::reflect::trace::Trace).

§reflect_dcg: bool

Reflect the DCG (See adapton::engine::reflect::DCG), including its values (See adapton::engine::reflect_val).

Trait Implementations§

Source§

impl Clone for SampleParams

Source§

fn clone(&self) -> SampleParams

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SampleParams

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.