Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

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

Reported by: Owned by: jbandlow mhansen major sage-3.1.3 combinatorics sage-combinat N/A

### 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.

### 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 new → closed

Merged in Sage 3.1.3.alpha3

### comment:4 Changed 14 years ago by mabshoff

Resolution: fixed closed → reopened

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 reopened → closed

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.