Re: [sage-combinat-devel] Re: number_of_partitions and friends

2012-08-30 Thread Nicolas M. Thiery
On Wed, Aug 29, 2012 at 08:32:11PM -0700, Andrew Mathas wrote: >Then I think the functionality of RestrictedPartitions should be fully >implemented in Partitions >by allowing several keyword entries. > >I had a look at the code and there doesn't seem to be an obvious qu

[sage-combinat-devel] Re: number_of_partitions and friends

2012-08-30 Thread Nicolas M. Thiery
On Thu, Aug 30, 2012 at 01:25:54AM -0700, Andrew Mathas wrote: >I have just noticed that Trac #13199 implements a new version of >number_of_partitions using flint. Was this the recent "optimisation" that >you were referring to? I was using Bober's implementation. Oh, yes indeed! Pretty

[sage-combinat-devel] Re: number_of_partitions and friends

2012-08-30 Thread Andrew Mathas
> Did you make a quick benchmark on Partitions().random_element(), with > and without caching? Given that number_of_partitions (which was > already fast) was even further optimized recently, maybe caching is > not relevant anymore? > > Hi Nicolas, I have just noticed that Trac #13199

Re: [sage-combinat-devel] Re: number_of_partitions and friends

2012-08-29 Thread Andrew Mathas
> >> Then I think the functionality of RestrictedPartitions should be fully >> implemented in Partitions >> by allowing several keyword entries. >> > I had a look at the code and there doesn't seem to be an obvious quick fix because the classes determined by parts_in and max_length and friend

Re: [sage-combinat-devel] Re: number_of_partitions and friends

2012-08-29 Thread John H Palmieri
On Wednesday, August 29, 2012 5:21:31 PM UTC-7, Anne Schilling wrote: > > On 8/29/12 5:11 PM, John H Palmieri wrote: > > > > > > On Wednesday, August 29, 2012 4:53:33 PM UTC-7, Anne Schilling wrote: > > > > In principle, reading the documentation of Partitions the command > > > > s

Re: [sage-combinat-devel] Re: number_of_partitions and friends

2012-08-29 Thread Anne Schilling
On 8/29/12 5:11 PM, John H Palmieri wrote: > > > On Wednesday, August 29, 2012 4:53:33 PM UTC-7, Anne Schilling wrote: > > In principle, reading the documentation of Partitions the command > > sage: RestrictedPartitions(5,[3,2,1], 3).list() > [[3, 1, 1], [2, 2, 1]] > > should b

Re: [sage-combinat-devel] Re: number_of_partitions and friends

2012-08-29 Thread John H Palmieri
On Wednesday, August 29, 2012 4:53:33 PM UTC-7, Anne Schilling wrote: > > In principle, reading the documentation of Partitions the command > > sage: RestrictedPartitions(5,[3,2,1], 3).list() > [[3, 1, 1], [2, 2, 1]] > > should be achieved by > > sage: Partitions(5, parts_in = [3,2,1], max_le

Re: [sage-combinat-devel] Re: number_of_partitions and friends

2012-08-29 Thread Anne Schilling
In principle, reading the documentation of Partitions the command sage: RestrictedPartitions(5,[3,2,1], 3).list() [[3, 1, 1], [2, 2, 1]] should be achieved by sage: Partitions(5, parts_in = [3,2,1], max_length=3) Partitions of the integer 5 with parts in [1, 2, 3] but unfortunately max_length i

[sage-combinat-devel] Re: number_of_partitions and friends

2012-08-29 Thread Andrew Mathas
John Palmieri has made the follow remark on trac: Regarding RestrictedPartitions: see #12278. Should it be deprecated at all? In particular, what's the replacement for something like RestrictedPartitions(5,[3,2,1], 3)? The best I can come up wi

[sage-combinat-devel] Re: number_of_partitions and friends

2012-08-29 Thread Nicolas M. Thiery
On Wed, Aug 29, 2012 at 05:34:36AM -0700, Andrew Mathas wrote: > Did you make a quick benchmark on Partitions().random_element(), with > and without caching? Given that number_of_partitions (which was > already fast) was even further optimized recently, maybe caching is > not re

[sage-combinat-devel] Re: number_of_partitions and friends

2012-08-29 Thread Andrew Mathas
> Did you make a quick benchmark on Partitions().random_element(), with > and without caching? Given that number_of_partitions (which was > already fast) was even further optimized recently, maybe caching is > not relevant anymore? > > From the remark in partition.py, I think that whoever cac

[sage-combinat-devel] Re: number_of_partitions and friends

2012-08-29 Thread Nicolas M. Thiery
Hi Andrew! On Tue, Aug 28, 2012 at 09:50:31PM -0700, Andrew Mathas wrote: >I have just pushed a new version of my partition tuple patch #13072 to the >combinat queue which addresses the deprecation issues flagged by Nicolas >and others. As there are many functions involved I th

[sage-combinat-devel] Re: number_of_partitions and friends

2012-08-28 Thread Andrew Mathas
I have just pushed a new version of my partition tuple patch #13072 to the combinat queue which addresses the deprecation issues flagged by Nicolas and others. As there are many functions involved I thought I should post a summary of the functions affected so that the few people in the universe

[sage-combinat-devel] Re: number_of_partitions and friends

2012-08-24 Thread John H Palmieri
On Friday, August 24, 2012 3:36:54 PM UTC-7, Andrew Mathas wrote: > > > > I don't think it's a good idea to remove functions from the global name >> space with no warning. If they were already deprecated, sure, but if not: >> deprecate them now, and remove them from the global name space in 6 m

[sage-combinat-devel] Re: number_of_partitions and friends

2012-08-24 Thread Andrew Mathas
I don't think it's a good idea to remove functions from the global name > space with no warning. If they were already deprecated, sure, but if not: > deprecate them now, and remove them from the global name space in 6 months > or a year. I remember seeing "number_of_partitions" used in some Sa

[sage-combinat-devel] Re: number_of_partitions and friends

2012-08-24 Thread John H Palmieri
On Friday, August 24, 2012 12:29:06 AM UTC-7, Nicolas M. Thiery wrote: > > On Thu, Aug 23, 2012 at 04:48:31PM -0700, Andrew Mathas wrote: > >Here, I think, is the complete list together with their recommended > >replacements: > > Thanks! If no one has complained in, say, two days, plea

[sage-combinat-devel] Re: number_of_partitions and friends

2012-08-24 Thread Travis Scrimshaw
Hey Andrew, I have no complaints. I've put myself down as the reviewer on the trac ticket, so let me know when the patch is ready for a review. Best, Travis On Thursday, August 23, 2012 5:11:03 PM UTC-7, Andrew Mathas wrote: > > I remembered that I did in fact discuss doing these deprecation

[sage-combinat-devel] Re: number_of_partitions and friends

2012-08-24 Thread Nicolas M. Thiery
On Thu, Aug 23, 2012 at 04:48:31PM -0700, Andrew Mathas wrote: >Here, I think, is the complete list together with their recommended >replacements: Thanks! If no one has complained in, say, two days, please go ahead. >Looking again at the code, the function cyclic_permutations_of_parti

[sage-combinat-devel] Re: number_of_partitions and friends

2012-08-23 Thread Andrew Mathas
I remembered that I did in fact discuss doing these deprecations on sage-combinat when I said that I wanted to implement a functional partition tuple class last year; see https://groups.google.com/forum/?fromgroups=#!topic/sage-combinat-devel/NFNRYjqoouM Specifically, I proposed to: 3. Depreci

[sage-combinat-devel] Re: number_of_partitions and friends

2012-08-23 Thread Andrew Mathas
Hi Nicolas, > Could you make a list of those that were not marked as deprecated? I > also vote for deprecating them, but other opinions are welcome. Here, I think, is the complete list together with their recommended replacements: deprecation(13072,'partitions_set is deprecated. Use SetP

Re: [sage-combinat-devel] Re: number_of_partitions and friends

2012-08-23 Thread Anne Schilling
I am also fine with deprecating the methods in Andrew's patch. Best, Anne On 8/23/12 8:57 AM, Nicolas M. Thiery wrote: > Hi Andrew, > > On Thu, Aug 23, 2012 at 05:23:32AM -0700, Andrew Mathas wrote: >>I have to confess that I didn't really appreciate that I was deprecating >>these

[sage-combinat-devel] Re: number_of_partitions and friends

2012-08-23 Thread Nicolas M. Thiery
Hi Andrew, On Thu, Aug 23, 2012 at 05:23:32AM -0700, Andrew Mathas wrote: >I have to confess that I didn't really appreciate that I was deprecating >these functions from the global name space but in any case I am in favour >of doing so, so +1. I have to confess in return that

[sage-combinat-devel] Re: number_of_partitions and friends

2012-08-23 Thread Andrew Mathas
ps. The list of functions disappearing from the global name space is: -RestrictedPartitions, PartitionsGreatestLE, partitions_set,\ -number_of_partitions_set, number_of_partitions_list, \ -ordered_partitions, number_of_ordered_partitions, number_of_partitions,\ -partitions, cyclic

[sage-combinat-devel] Re: number_of_partitions and friends

2012-08-23 Thread Andrew Mathas
Hi Nicolas, I have to confess that I didn't really appreciate that I was deprecating these functions from the global name space but in any case I am in favour of doing so, so +1. Patch #13072 deprecates such functions in favour of the cardinality method of the corresponding partition class. Th