class Pegasus::Automata::State(V, T)

Overview

A generic state for an automaton, with transitions labeled by T and values of V.

Defined in:

pegasus/automaton.cr

Constructors

Instance Method Summary

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.


[View source]

Instance Method Detail

def data : V #

The additional data the state holds.


[View source]
def id : Int64 #

The unique ID of the state.


[View source]
def transitions : Hash(T, self) #

The transitions from this state to other states.


[View source]