class Pegasus::Automata::State(V, T)
- Pegasus::Automata::State(V, T)
- Reference
- Object
Overview
A generic state for an automaton, with transitions labeled by T and values of V.
Defined in:
pegasus/automaton.crConstructors
-
.new(*, id : Int64, data : V, transitions : Hash(T, Pegasus::Automata::State(V, T)) = Hash(T, self).new)
Creates a new state with the given ID, data, and transitions.
Instance Method Summary
-
#data : V
The additional data the state holds.
-
#id : Int64
The unique ID of the state.
-
#transitions : Hash(T, self)
The transitions from this state to other states.
Constructor Detail
def self.new(*, id : Int64, data : V, transitions : Hash(T, Pegasus::Automata::State(V, T)) = Hash(T, self).new)
#
Creates a new state with the given ID, data, and transitions.