#include <state.hpp>
Public Types | |
enum | transition_result { run, halt } |
Public Member Functions | |
state () | |
Default constructor. | |
~state () | |
trivial destructor. | |
void | create_transition (T read, T write, typename std::vector< state< T > >::size_type next_state, typename infinite_tape< T >::direction move) |
adds a full transition (read, write, move, next_state). | |
void | create_write_transition (T read, T write, typename std::vector< state< T > >::size_type next_state) |
adds a full transition (read, write, next_state) adds a 4 tuple write transition | |
void | create_move_transition (T read, typename std::vector< state< T > >::size_type next_state, typename infinite_tape< T >::direction move) |
adds a full transition (read, move, next_state) adds a 4 tuple move transition | |
transition_result | perform_transition (infinite_tape< T > &tape, typename std::vector< state< T > >::size_type &state_index) |
performs a transition given a tape. | |
transition_result | simulate_transition (T tape_read, T &tape_write, typename infinite_tape< T >::direction &tape_move, typename std::vector< state< T > >::size_type &state_index) const |
simulates performance of a transition given the relevant tape specification. | |
void | print (std::ostream &out) const |
displayes the states of the set. | |
Protected Attributes | |
std::map< T, transition_struct > | transition_map |
map of the transitions on this state with the read symbol as the key |
Definition at line 54 of file state.hpp.
|
Default constructor.
|
|
trivial destructor.
|
|
adds a full transition (read, move, next_state) adds a 4 tuple move transition
|
|
adds a full transition (read, write, move, next_state). adds a full 5 tuple transition
Definition at line 93 of file state.hpp. Referenced by transition_result::create_move_transition(), and transition_result::create_write_transition(). |
|
adds a full transition (read, write, next_state) adds a 4 tuple write transition
|
|
performs a transition given a tape.
|
|
displayes the states of the set.
|
|
simulates performance of a transition given the relevant tape specification.
|