Trait turingmachine_rs::TuringStates [−][src]
A trait that implements the behaviour for turing states
Required methods
fn step(&self, current_token: Alphabet) -> (Self, Alphabet, Move)
[src]
The internal step function Output the new state, token at current cursor position, and move of the cursor position
Provided methods
fn internal_step(&mut self, tape: &TuringTape<Alphabet>)
[src]
Execute one step of the turing machine
fn run_until_end(
start_state: Self,
end_states: Vec<Self>,
empty_token: Alphabet,
start_token: Alphabet,
initial_state: Vec<Alphabet>
) -> (Self, Vec<Alphabet>)
[src]
start_state: Self,
end_states: Vec<Self>,
empty_token: Alphabet,
start_token: Alphabet,
initial_state: Vec<Alphabet>
) -> (Self, Vec<Alphabet>)
Run this turing machine from a start state, until it eaches a final state. Will return a tuple containing the end_state and a vector of the memory state.