pub struct HeadStep<'a, Q1, A1, Q2 = Q1, A2 = A1>{ /* private fields */ }Expand description
HeadStep defines a lazy stepper for a Turing machine configured with a so-called
moving head.
Implementations§
Source§impl<'a, Q, A> HeadStep<'a, Q, A>where
Q: RawState,
the standard implementation of HeadStep focuses on instances where the head and tail
share the same type-space; meaning Head<Q, A> and Tail<Q, A> types are being utilized.
impl<'a, Q, A> HeadStep<'a, Q, A>where
Q: RawState,
the standard implementation of HeadStep focuses on instances where the head and tail
share the same type-space; meaning Head<Q, A> and Tail<Q, A> types are being utilized.
Source§impl<'a, Q, A> HeadStep<'a, Q, usize, Q, A>where
Q: RawState,
this implementation of the HeadStep is specifically designed for scenarios where the
head’s symbol is used to define the position
impl<'a, Q, A> HeadStep<'a, Q, usize, Q, A>where
Q: RawState,
this implementation of the HeadStep is specifically designed for scenarios where the
head’s symbol is used to define the position
Sourcepub fn shift(self, tape: &mut [A]) -> Result<Head<Q, A>>where
A: Clone,
pub fn shift(self, tape: &mut [A]) -> Result<Head<Q, A>>where
A: Clone,
this method shifts the head along the tape, returning a head containing the previous state and symbol.
note: this method does not check if the current nor the next state is halted, it is up to the caller to establishing halting.
Auto Trait Implementations§
impl<'a, Q1, A1, Q2, A2> Freeze for HeadStep<'a, Q1, A1, Q2, A2>
impl<'a, Q1, A1, Q2, A2> RefUnwindSafe for HeadStep<'a, Q1, A1, Q2, A2>
impl<'a, Q1, A1, Q2, A2> Send for HeadStep<'a, Q1, A1, Q2, A2>
impl<'a, Q1, A1, Q2, A2> Sync for HeadStep<'a, Q1, A1, Q2, A2>
impl<'a, Q1, A1, Q2, A2> Unpin for HeadStep<'a, Q1, A1, Q2, A2>
impl<'a, Q1, A1, Q2 = Q1, A2 = A1> !UnwindSafe for HeadStep<'a, Q1, A1, Q2, A2>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more