Ticket #11333: 11333_incidence_structure_equality.patch

File 11333_incidence_structure_equality.patch, 1.4 KB (added by brett, 9 years ago)
  • sage/combinat/designs/incidence_structures.py

    # HG changeset patch
    # User Brett Stevens <brett@math.carleton.ca>
    # Date 1305234175 14400
    # Node ID dfee7614b721b361ba6ae8a2f0fc7c72dc97c738
    # Parent  361a4ad7d52c69b64ae2e658ffd0820af0d87e93
    11333: incidence structure points sorted
    
    diff -r 361a4ad7d52c -r dfee7614b721 sage/combinat/designs/incidence_structures.py
    a b  
    103103            sage: IncidenceStructure(range(7),[[0,1,2],[0,3,4],[0,5,6],[1,3,5],[1,4,6],[2,3,6],[2,4,5]])
    104104            Incidence structure with 7 points and 7 blocks
    105105       
     106        Points are sorted  ::
     107
     108            sage: BD1 = IncidenceStructure([4,6,0,3,2,5,1],[[0,1,2],[0,3,4],[0,5,6],[1,3,5],[1,4,6],[2,3,6],[2,4,5]])
     109            sage: BD1.points()
     110            [0, 1, 2, 3, 4, 5, 6]
     111
     112        TESTS:
     113
     114        The following shows that Trac Ticket #11333  is fixed.  ::
     115
     116            sage: A = IncidenceStructure([0,1],[[0]])
     117            sage: B = IncidenceStructure([1,0],[[0]])
     118            sage: B==A
     119            True
     120       
    106121        REFERENCES:
    107122
    108123        - E. Assmus, J. Key, Designs and their codes, CUP, 1992.
    109124        """
    110125        bs = []
    111126        self.pnts = pts
     127        self.pnts.sort()
    112128        v, blocks = len(pts), blks
    113129        for block in blocks:
    114130            if test: