#19199: FiniteStateMachine: do not mess with color 'None'
-------------------------------------+-------------------------------------
Reporter: cheuberg | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.9
Component: finite state machines | Keywords: color
Merged in: | Authors: Clemens Heuberger
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
-------------------------------------+-------------------------------------
Currently, `determinisation`, `product_FiniteStateMachine` and related
functions construct colors as frozensets or tuples of colors of its
constituent states. If all colors are None, this leads to strange
artifacts:
{{{
sage: A = Automaton([(0, 0, 0)], initial_states=[0], final_states=[0])
sage: [s.color for s in A.determinisation().iter_states()]
[frozenset({None})]
sage: [s.color for s in A.cartesian_product(A).iter_states()]
[(None, None)]
sage: T = Transducer([(0, 0, 0, 0)], initial_states=[0], final_states=[0])
sage: [s.color for s in T.composition(T).iter_states()]
[(None, None)]
sage: [s.color
....: for s in T.product_FiniteStateMachine(
....: T, lambda t1, t2: (0, 0)).iter_states()]
[(None, None)]
}}}
In those case, just use the color `None` if all constituent states have
color `None`.
--
Ticket URL: <http://trac.sagemath.org/ticket/19199>
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.