Ticket #2164 (closed enhancement: fixed)
[with patch, with positive review] add fast iterator for partitions
| Reported by: | mhansen | Owned by: | mhansen |
|---|---|---|---|
| Priority: | minor | Milestone: | sage-2.10.2 |
| Component: | combinatorics | Keywords: | |
| Cc: | sage-combinat | Work issues: | |
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description
which only returns lists rather than Partition_class objects.
This is also useful where you don't necessarily need the Partition_class object, you just need the values.
Before the patch:
sage: timeit a = Partitions(40).list() 10 loops, best of 3: 1.4 s per loop
After the patch:
sage: timeit a = Partitions(40).list() 10 loops, best of 3: 280 ms per loop
Attachments
Change History
comment:1 Changed 5 years ago by mhansen
- Status changed from new to assigned
- Summary changed from add fast iterator for partitions to [with patch, needs review] add fast iterator for partitions
comment:3 Changed 5 years ago by ncalexan
- Type changed from defect to enhancement
- Summary changed from [with patch, needs review] add fast iterator for partitions to [with patch, with positive review] add fast iterator for partitions
Looks fine to me.
Note: See
TracTickets for help on using
tickets.

