Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#4242 closed defect (fixed)

[with patch, positive reivew] Bugfix for dominates() method of partition.py

Reported by: jbandlow Owned by: mhansen
Priority: major Milestone: sage-3.1.3
Component: combinatorics Keywords:
Cc: sage-combinat Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

p.dominates(q) would give the wrong answer (True) if q had more boxes than p, but the first (length of p) parts of q were dominated by p. Attached patch fixes this.

Attachments (2)

4242.patch (1.2 KB) - added by jbandlow 14 years ago.
trac_4242.patch (940 bytes) - added by mhansen 14 years ago.

Download all attachments as: .zip

Change History (10)

Changed 14 years ago by jbandlow

Attachment: 4242.patch added

comment:1 Changed 14 years ago by mhansen

Summary: Bugfix for dominates() method of partition.py (with patch; needs review)[with patch, positive review] Bugfix for dominates() method of partition.py (with patch; needs review)

Thanks Jason! Looks good to me.

comment:2 Changed 14 years ago by mabshoff

Summary: [with patch, positive review] Bugfix for dominates() method of partition.py (with patch; needs review)[with patch, positive review] Bugfix for dominates() method of partition.py

comment:3 Changed 14 years ago by mabshoff

Resolution: fixed
Status: newclosed

Merged in Sage 3.1.3.alpha3

comment:4 Changed 14 years ago by mabshoff

Resolution: fixed
Status: closedreopened

With the patch applied I get

sage -t  devel/sage/sage/combinat/partition.py              
**********************************************************************
File "/scratch/mabshoff/release-cycle/sage-3.1.3.alpha3/tmp/partition.py", line 604:
    sage: Partition([]).dominates([1])
Expected:
    False
Got:
    True
**********************************************************************

I assumed that at least the patched file would be doctested :(

Cheers,

Michael

comment:5 Changed 14 years ago by mabshoff

Summary: [with patch, positive review] Bugfix for dominates() method of partition.py[with patch, needs work] Bugfix for dominates() method of partition.py

Changed 14 years ago by mhansen

Attachment: trac_4242.patch added

comment:6 Changed 14 years ago by mabshoff

Summary: [with patch, needs work] Bugfix for dominates() method of partition.py[with patch, positive reivew] Bugfix for dominates() method of partition.py

Looks good to me. Thanks Mike.

Cheers,

Michael

comment:7 Changed 14 years ago by mabshoff

Resolution: fixed
Status: reopenedclosed

Merged in Sage 3.1.3.rc0

comment:8 Changed 14 years ago by nthiery

Cc: sage-combinat added; jbandlow removed
Note: See TracTickets for help on using tickets.