Ticket #7311: trac_7311_review-abm.patch

File trac_7311_review-abm.patch, 2.7 KB (added by abmasse, 11 years ago)

Minor doc and code formatting fixes -- apply on top of Nathann's patch

  • sage/numerical/mip.pyx

    # HG changeset patch
    # User Alexandre Blondin Masse < alexandre.blondin.masse at gmail.com>
    # Date 1267710152 -3600
    # Node ID 3019fa0b143ec38a40b8bd6aabde4ad5e9dfe075
    # Parent  cdf906d1912e376d2c225f7ee6bd9ccf00df8ac1
    #7311 minor doc and code formatting fixes
    
    diff --git a/sage/numerical/mip.pyx b/sage/numerical/mip.pyx
    a b class MixedIntegerLinearProgram: 
    629629        INPUT:
    630630
    631631        - ``linear_function`` -- Two different types of arguments are possible:
    632 
    633632            - A linear function. In this case, arguments ``min`` or ``max``
    634633              have to be specified.
    635 
    636634            - A linear constraint of the form ``A <= B``, ``A >= B``,
    637635              ``A <= B <= C``, ``A >= B >= C`` or ``A == B``. In this
    638636              case, arguments ``min`` and ``max`` will be ignored.
    639 
    640637        - ``max`` -- An upper bound on the constraint (set to ``None``
    641638          by default). This must be a numerical value.
    642 
    643639        - ``min`` -- A lower bound on the constraint.  This must be a
    644640          numerical value
    645 
    646641        - ``name`` -- A name for the constraint.
    647642
    648643        EXAMPLE:
    class MixedIntegerLinearProgram: 
    722717            c = len(self._constraints_bounds_min)
    723718
    724719            for (v,coeff) in f.iteritems():
    725                 if v!=-1:
     720                if v != -1:
    726721                    self._constraints_matrix_i.append(c)
    727722                    self._constraints_matrix_j.append(v)
    728723                    self._constraints_matrix_values.append(coeff)
    class LinearFunction: 
    14651460        by the keys ( which are integers ). The key ``-1``
    14661461        corresponds to the constant term.
    14671462
    1468         EXAMPLE:
     1463        EXAMPLE::
    14691464
    14701465            sage: from sage.numerical.mip import LinearFunction
    14711466            sage: lf = LinearFunction({0 : 1, 3 : -8})
    class LinearFunction: 
    16661661
    16671662    def __hash__(self):
    16681663        r"""
    1669         Defining a ``__hash__`` function
     1664        Defines a ``__hash__`` function
    16701665
    16711666        EXAMPLE::
    16721667
    class LinearConstraint: 
    17231718
    17241719        INPUT:
    17251720       
    1726         - ``c`` -- A ``LinearFunction``
     1721        - ``c`` -- A linear function (see ``LinearFunction``).
    17271722       
    17281723        EXAMPLE::
    17291724       
    class LinearConstraint: 
    17411736
    17421737    def __repr__(self):
    17431738        r"""
    1744         Returns a description of the constraint
     1739        Returns a string representation of the constraint.
    17451740       
    17461741        EXAMPLE::
    17471742
    class LinearConstraint: 
    18041799
    18051800    def __lt__(self, other):
    18061801        r"""
    1807         Prevents the use of the stricts operators ``<,>``
     1802        Prevents the use of the stricts operators ``<`` and ``>``
    18081803       
    18091804        EXAMPLE::
    18101805