Module sm :: Class PureFunction
[frames] | no frames]

Class PureFunction

SM --+
     |
    PureFunction

Machine whose output is produced by applying a specified Python function to its input.

Instance Methods
 
__init__(self, f)
 
getNextValues(self, state, inp)
Default version of this method.

Inherited from SM: check, doTraceTasks, done, getStartState, guaranteeName, isDone, printDebugInfo, run, start, step, transduce, transduceF

Class Variables

Inherited from SM: legalInputs, name, startState

Instance Variables

Inherited from SM: state

Method Details

__init__(self, f)
(Constructor)

 
Parameters:
  • f - a function of one argument

getNextValues(self, state, inp)

 

Default version of this method. If a subclass only defines getNextState, then we assume that the output of the machine is the same as its next state.

Overrides: SM.getNextValues
(inherited documentation)