Ticket #15078: trac_15078_fsm_docstrings.patch

File trac_15078_fsm_docstrings.patch, 1.9 KB (added by dkrenn, 6 years ago)
  • sage/combinat/finite_state_machine.py

    # HG changeset patch
    # User Daniel Krenn <math+sage@danielkrenn.at>
    # Date 1377194778 -7200
    # Node ID d813d31511ad71bd111e9ff0817ad3b1e72793e3
    # Parent  4d575d15945e83cf4c7f976bf99d749c5b7844d4
    Trac 15078: fsm, fixing docstrings
    
    diff --git a/sage/combinat/finite_state_machine.py b/sage/combinat/finite_state_machine.py
    a b  
    14231423
    14241424
    14251425    def _latex_(self):
    1426         """
     1426        r"""
    14271427        Returns a LaTex code for the graph of the finite state machine.
    14281428
    14291429        EXAMPLES::
     
    15641564            [1 0 0 0 1]
    15651565            [0 1 1 0 0]
    15661566            [0 0 0 1 1]
    1567             sage: B.adjacency_matrix(1, entry=(lambda transition: \
     1567            sage: B.adjacency_matrix(1, entry=(lambda transition:
    15681568            ....:     exp(I*transition.word_out[0]*var('t'))))
    15691569            [      0       1       0       0       0]
    15701570            [      0       0       0       1       0]
     
    33053305        ``word_out`` values.
    33063306
    33073307        EXAMPLES::
     3308
    33083309            sage: fsm = FiniteStateMachine([("A", "B", 0, 1), ("A", "B", 1, 0),
    33093310            ....:                           ("B", "C", 0, 0), ("B", "C", 1, 1),
    33103311            ....:                           ("C", "D", 0, 1), ("C", "D", 1, 0),
     
    35623563    machine.
    35633564
    35643565    An instance of this class is generated when
    3565     :meth:`FiniteStateMachine.process` oder
     3566    :meth:`FiniteStateMachine.process` or
    35663567    :meth:`FiniteStateMachine.iter_process` of the finite state
    35673568    machine is invoked. It behaves like an iterator which, in each
    35683569    step, takes one letter of the input and runs (one step on) the
     
    38343835    to the preamble of Latex so that the finite state machines can be
    38353836    drawn nicely.
    38363837
    3837     TESTS:
     3838    TESTS::
    38383839
    38393840        sage: from sage.combinat.finite_state_machine import setup_latex_preamble
    38403841        sage: setup_latex_preamble()