Ticket #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 | Work issues: | |
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
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
Change History
comment:1 Changed 5 years ago by mhansen
- Summary changed from Bugfix for dominates() method of partition.py (with patch; needs review) to [with patch, positive review] Bugfix for dominates() method of partition.py (with patch; needs review)
Thanks Jason! Looks good to me.
comment:2 Changed 5 years ago by mabshoff
- Summary changed from [with patch, positive review] Bugfix for dominates() method of partition.py (with patch; needs review) to [with patch, positive review] Bugfix for dominates() method of partition.py
comment:3 Changed 5 years ago by mabshoff
- Status changed from new to closed
- Resolution set to fixed
Merged in Sage 3.1.3.alpha3
comment:4 Changed 5 years ago by mabshoff
- Status changed from closed to reopened
- Resolution fixed deleted
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 5 years ago by mabshoff
- Summary changed from [with patch, positive review] Bugfix for dominates() method of partition.py to [with patch, needs work] Bugfix for dominates() method of partition.py
comment:6 Changed 5 years ago by mabshoff
- Summary changed from [with patch, needs work] Bugfix for dominates() method of partition.py to [with patch, positive reivew] Bugfix for dominates() method of partition.py
Looks good to me. Thanks Mike.
Cheers,
Michael
Note: See
TracTickets for help on using
tickets.

