LabState

Struct LabState 

Source
pub struct LabState<R: Rng + Clone, Input, EditSt, Output, Editor: Generate<Input> + Edit<Input, EditSt>, Archivist: ComputeDemand<Input, Output>> {
    pub params: LabParams,
    pub rng: Box<R>,
    pub change_batch_num: usize,
    pub dcg_state: LabEngineState<Input, EditSt, Output, Editor, Archivist>,
    pub naive_state: LabEngineState<Input, EditSt, Output, Editor, Archivist>,
    pub samples: Vec<Sample>,
}

Fields§

§params: LabParams§rng: Box<R>§change_batch_num: usize§dcg_state: LabEngineState<Input, EditSt, Output, Editor, Archivist>§naive_state: LabEngineState<Input, EditSt, Output, Editor, Archivist>§samples: Vec<Sample>

Trait Implementations§

Source§

impl<Input: Clone + Debug, EditSt, Output: Eq + Debug, Editor: Generate<Input> + Edit<Input, EditSt>, Archivist: ComputeDemand<Input, Output>> SampleGen for LabState<StdRng, Input, EditSt, Output, Editor, Archivist>

Advances the LabState forward by one sample of each engine. For each engine, we process the current input (either generating it, or editing it) and we compute a new output over this processed input. Optionally, we compare the outputs of the engines for equality.

Source§

fn sample(&mut self) -> Option<Sample>

Auto Trait Implementations§

§

impl<R, Input, EditSt, Output, Editor, Archivist> !Freeze for LabState<R, Input, EditSt, Output, Editor, Archivist>

§

impl<R, Input, EditSt, Output, Editor, Archivist> !RefUnwindSafe for LabState<R, Input, EditSt, Output, Editor, Archivist>

§

impl<R, Input, EditSt, Output, Editor, Archivist> !Send for LabState<R, Input, EditSt, Output, Editor, Archivist>

§

impl<R, Input, EditSt, Output, Editor, Archivist> !Sync for LabState<R, Input, EditSt, Output, Editor, Archivist>

§

impl<R, Input, EditSt, Output, Editor, Archivist> Unpin for LabState<R, Input, EditSt, Output, Editor, Archivist>
where Editor: Unpin, Archivist: Unpin, Output: Unpin, Input: Unpin, EditSt: Unpin,

§

impl<R, Input, EditSt, Output, Editor, Archivist> !UnwindSafe for LabState<R, Input, EditSt, Output, Editor, Archivist>

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> 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, 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.