#18118: transducer: convenience option for process words iterativly (and showing
output)
-------------------------------------+----------------------------
   Reporter:  dkrenn                 |            Owner:
       Type:  enhancement            |           Status:  new
   Priority:  major                  |        Milestone:  sage-6.6
  Component:  finite state machines  |         Keywords:  sd66
  Merged in:                         |          Authors:
  Reviewers:                         |  Report Upstream:  N/A
Work issues:                         |           Branch:
     Commit:                         |     Dependencies:
   Stopgaps:                         |
-------------------------------------+----------------------------
 This ticket introduces a new option so that {{{iter_processs}}} gives the
 output of a transducer (when processing a word) step by step. If the
 transducer branches (non-deterministic transducer), an exception is
 raised.

 This is in contrast to the existing implementation, where the full output
 (including information on all branches of the process) is given back in
 each step during iteration.

 An example:
 {{{
 sage: inverter = Transducer({'A': [('A', 0, 1), ('A', 1, 0)]},
 ....:     initial_states=['A'], final_states=['A'])
 sage: it = inverter.iter_process(
 ....:     words.FibonacciWord(), iterator_type='simple')
 sage: from itertools import islice
 sage: [o for o in islice(it, 0, 5)]  # only output the first 5 letters
 [1, 0, 1, 1, 0]
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/18118>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to