50 [[nodiscard]] std::string_view
get_label() const noexcept {
return this->
label_; }
70 return this->
label_ == other.label_;
85 return this->label_ <=> other.label_;
Represents a single state in the finite set of states (Q) of the Turing Machine.
std::string label_
The unique identifier name of the state.
auto operator<=>(const State &other) const noexcept
Provides lexicographical ordering based solely on the state's label.
State(std::string label, bool is_accept) noexcept(false)
Explicit constructor to create a named State.
bool is_accept_
Flag indicating if this is a final/halting state.
std::string_view get_label() const noexcept
Getter for the state's unique label.
State() noexcept
Default constructor.
bool operator==(const State &other) const noexcept
Compares two states for equality using only their unique identifier.
bool is_accept() const noexcept
Checks if this state is an accepting (final) state.