#16588: finite_state_machine.FSMState: New method fully_equal
-------------------------------------+-------------------------------------
Reporter: cheuberg | Owner:
Type: defect | Status: new
Priority: minor | Milestone: sage-6.3
Component: finite state machines | Keywords:
Merged in: | finite_state_machine
Reviewers: | Authors: Clemens Heuberger
Work issues: | Report Upstream: N/A
Commit: | Branch:
f5b24c3d638ec739511a19c7c9b5513968e652bd| u/cheuberg/fsm/states_equality
Stopgaps: | Dependencies:
-------------------------------------+-------------------------------------
{{{finite_state_machine.FSMState.__eq__}}} only compares labels of states,
but not their other attributes such as {{{is_initial}}}, {{{is_final}}},
{{{final_word_out}}}, {{{word_out}}}, {{{color}}}.
The reason is that states have to be hashable and that their hash only
depends on the label --- therefore, states with the same labels have to be
equal.
This is no problem as long as states of the same finite state machine are
compared. When comparing two finite state machines, this distinction
matters.
Therefore, a new method {{{FSMState.fully_equal}}} is introduced and used
in {{{FiniteStateMachine.__eq__}}}.
--
Ticket URL: <http://trac.sagemath.org/ticket/16588>
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.