class Nfa2Dfa::Transition

Transition between states

Attributes

alphabet[R]
beginning_state[R]
ending_state[R]

Public Class Methods

new(beg_state, alphabet, end_state) click to toggle source
# File lib/transition.rb, line 10
def initialize(beg_state, alphabet, end_state)
  @beginning_state = beg_state
  @alphabet = alphabet
  @ending_state = end_state
end

Public Instance Methods

print() click to toggle source
to_graph_transition(graphviz_graph) click to toggle source
# File lib/transition.rb, line 16
def to_graph_transition(graphviz_graph)
  graphviz_graph.add_edges(
    @beginning_state.graphviz_node,
    @ending_state.graphviz_node, :label => @alphabet)
end
to_s() click to toggle source
# File lib/transition.rb, line 22
def to_s
  ret = @beginning_state.to_s + '-' + alphabet + '-' + @ending_state.to_s
  ret
end