Ticket #2164 (closed enhancement: fixed)

Opened 5 years ago

Last modified 4 years ago

[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

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

Change History

Changed 5 years ago by mhansen

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

Changed 5 years ago by mhansen

comment:2 Changed 5 years ago by mhansen

Apply both patches.

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.

comment:4 Changed 5 years ago by mabshoff

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

Merged in Sage 2.10.2.alpha0

comment:5 Changed 4 years ago by nthiery

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