Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#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 Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
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 (2)

2164.patch (1.4 KB) - added by mhansen 11 years ago.
2164-2.patch (5.0 KB) - added by mhansen 11 years ago.

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by mhansen

comment:1 Changed 11 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

Changed 11 years ago by mhansen

comment:2 Changed 11 years ago by mhansen

Apply both patches.

comment:3 Changed 11 years ago by ncalexan

  • Summary changed from [with patch, needs review] add fast iterator for partitions to [with patch, with positive review] add fast iterator for partitions
  • Type changed from defect to enhancement

Looks fine to me.

comment:4 Changed 11 years ago by mabshoff

  • Resolution set to fixed
  • Status changed from assigned to closed

Merged in Sage 2.10.2.alpha0

comment:5 Changed 10 years ago by nthiery

  • Cc sage-combinat added
Note: See TracTickets for help on using tickets.