Changes between Version 18 and Version 20 of Ticket #13072
 Timestamp:
 08/31/12 08:24:05 (8 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

Ticket #13072 – Description
v18 v20 44 44 1. A=sage.combinat.partition.number_of_partitions() is marked for deprecation in favour of B=sage.combinat.partitions.number_of_partitions(), which is what function A() calls most of the time. As agreed above, number_of_partitions() will stay in the global name space, but this made the deprecation somewhat fiddly as I did not want to deprecate number_of_partitions() for "normal use" because from the user perspective this function will not change. Instead, I have deprecated the individual options of number_of_partitions() so deprecation warnings are only generated when A() does NOT call B(). In the global namespace, number_of_partitions still points to A(). When the functions which are marked for deprecation below are removed, number_of_partitions() should be changed to point to B() and A() should be changed into a deprecated_function_alias to B(). See the patch for more details. 45 45 46 2. For use in Partitions().random_element() the function number_of_partitions() was cached. This cached function was almost never used so, assuming that caching this function is a good idea, I decided to cache sage.combinat.partitions.number_of_partitions() always. Please let me know if this is a bad idea. ''In fact, this leads to a dramatic speedup. See the timings below''  although, this should be looked at again when Fredrik Johansson's patch #13199, which uses FLINT to implement a faster version of number_of_partitions, is merged into sage. 46 2. For use in Partitions().random_element() the function number_of_partitions() was cached. This cached function was almost never used so, assuming that caching this function is a good idea, I decided to use a cached version of number_of_partitions() inside partition.py always. ''As shown in the comments below, this leads to a dramatic speedup.'' 47 48 This probably should be **revisited** when Fredrik Johansson's patch #13199, which uses FLINT to implement a faster version of number_of_partitions, is merged into sage. 47 49 48 50 3. The two functions