Skip to main content

Machine

Struct Machine 

Source
pub struct Machine { /* private fields */ }
Expand description

One compiled node and every call site’s state, run over any span of the grid in order. A span continues exactly where the last ended, so blocks write the samples one run would.

Implementations§

Source§

impl Machine

Source

pub fn over(spanned: &Spanned, at: i64) -> Result<Machine, SampleError>

Stepping from at, each span’s own program from where it starts.

Source

pub fn width(&self) -> usize

Source

pub fn stateful(&self) -> bool

Source

pub fn bytes(&self) -> usize

Source

pub fn run_to( &mut self, to: i64, reads: &[Window<'_>], own: &mut Tape, ) -> Result<(), SampleError>

Source

pub fn run_on( &mut self, to: i64, reads: &[Window<'_>], own: &mut Tape, ) -> Result<(), SampleError>

run_to, the filters’ frames kept.

Source

pub fn solver(&self, site: usize) -> Option<&dyn Solver>

Call site site’s solver as it stands now, where that site is one.

Source

pub fn filter(&self, site: usize) -> Option<&FilterSite>

Source

pub fn state(&self) -> MachineState

Source

pub fn restart(&mut self)

Source

pub fn accepts(&self, held: &MachineState) -> bool

Whether carry takes held: the same sites, a varying parameter’s values aside.

Source

pub fn carry(&mut self, held: &MachineState) -> bool

Takes held’s state whole where its sites are these; false, and nothing taken, else.

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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.