Ticket #12463: trac_12463_polyhedron_eq_typo.patch

File trac_12463_polyhedron_eq_typo.patch, 1.2 KB (added by novoselt, 9 years ago)
  • sage/geometry/polyhedron/base.py

    # HG changeset patch
    # User Andrey Novoseltsev <novoselt@gmail.com>
    # Date 1337900849 25200
    # Node ID ea5539eb87926aa83c9ce29a94ee764085417d3f
    # Parent  f48a383e25e9fcd160f7427eb2507918eb6338e4
    Fix a typo in the documentation of __eq__ method of Polyhedron.
    
    diff --git a/sage/geometry/polyhedron/base.py b/sage/geometry/polyhedron/base.py
    a b  
    358358
    359359    def __eq__(self, other):
    360360        """
    361         Test whether ``self`` is a strict sub-polyhedron of ``other``.
     361        Test whether ``self`` is equal to ``other``.
    362362
    363363        INPUT:
    364364
     
    378378            True
    379379            sage: Q == P   # indirect doctest
    380380            False
     381           
     382        TESTS:
     383       
     384        This is an example from :trac:`12463`::
     385
     386            sage: P = Polyhedron([(0,0)], rays=[(1,1)])
     387            sage: Q1 = Polyhedron([(0,0), (1,1)])
     388            sage: Q2 = Polyhedron([(1,0), (0,1)])
     389            sage: Q = Q1.intersection(Q2)
     390            sage: Q == P
     391            False
     392            sage: Q < P
     393            True
    381394        """
    382395        return self._is_subpolyhedron(other) and other._is_subpolyhedron(self)
    383396