FSAPy/download/files/FSA.py
def delta(self, input):
		"""Perform a transition and execute action."""

		si = (self.state, input)

		newstate = None
		emission = None

		if self.states.has_key(si):
			newstate, action, emission = self.states[si]

		if self.dbg != None:
			self.dbg.write('State: %s / Input: %s /'
				'Next State: %s / Action: %s\n' %
				(self.state, input, newstate, action, emission))

		#if action:
		#	apply(action, (self.state, input, index))
		if newstate:
			self.state = newstate
		return emission
Perform a transition and execute action.
Perform a transition and execute action.
Perform a transition and execute action .
def delta(self, input):
		si = (self.state, input)
		newstate = None
		emission = None
		if self.states.has_key(si):
			newstate, action, emission = self.states[si]
		if self.dbg != None:
			self.dbg.write('State: %s / Input: %s /'
				'Next State: %s / Action: %s\n' %
				(self.state, input, newstate, action, emission))
		if newstate:
			self.state = newstate
		return emission
def delta ( self , input ) : si = ( self . state , input ) newstate = None emission = None if self . states . has_key ( si ) : newstate , action , emission = self . states [ si ] if self . dbg != None : self . dbg . write ( 'State: %s / Input: %s /' 'Next State: %s / Action: %s\n' % ( self . state , input , newstate , action , emission ) ) if newstate : self . state = newstate return emission
Perform a transition and execute action.
Perform a transition and execute action .
"""Perform a transition and execute action.""" #if action: #	apply(action, (self.state, input, index))
self
input